summaryrefslogtreecommitdiff
path: root/cpukit/libmisc/rtems-fdt/rtems-fdt.c (follow)
AgeCommit message (Collapse)Author
2020-10-20rtems-fdt / shell - Fix string truncation warningFrank Kühndel
The compiler warning was: ../../../cpukit/libmisc/rtems-fdt/rtems-fdt.c:267:5: warning: 'strncpy' specified bound depends on the length of the source argument 267 | strncpy(path, name, namelen); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ It turns out that the `strncpy()` nor the buffer `path` is needed when one uses `strncmp()` instead of `strcmp()`. This needs some change to the algorithm but has the advantage that `name` is never truncated to the size of the buffer `path`.
2020-10-16Revert "rtems-fdt / shell - Fix string truncation warning"Sebastian Huber
This reverts commit 355bc37ad35a7d67a7209130171febe805c67f62.
2020-10-15rtems-fdt / shell - Fix string truncation warningFrank Kühndel
The compiler warning was: ../../../cpukit/libmisc/rtems-fdt/rtems-fdt.c:267:5: warning: 'strncpy' specified bound depends on the length of the source argument 267 | strncpy(path, name, namelen); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ It turns out that the `strncpy()` nor the buffer `path` is needed when one uses `strncmp()` instead of `strcmp()`. This needs some change to the algorithm but has the advantage that `name` is never truncated to the size of the buffer `path`. Note: rtems-fdt.c, rtems-fdt-shell.c and cpukit/include/rtems/rtems-fdt.h seem to be dead code. They implement a shell command `fdt` but that command is not part of the shell nor of any macro in cpukit/include/rtems/shellconfig.h.
2018-02-08fdt: Use self-contained mutexSebastian Huber
Update #2843.
2017-08-20libmisc/rtems-fdt: Add RTEMS FDT wrapper and shell command to libmisc.Chris Johns
- Provide application support for handling FDT blobs in RTEMS. This is useful when interfacing FPGA fabrics. - Provide a shell command to list a blob as well as provide read and write access to addresses in the FTB. Closes #3099.