Age | Commit message (Collapse) | Author |
|
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`.
|
|
This reverts commit 355bc37ad35a7d67a7209130171febe805c67f62.
|
|
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.
|
|
Update #2843.
|
|
- 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.
|