RTEMS | microblaze: harden stdout-path parsing for console (!981)
Kinsey Moore (@opticron)
gitlab at rtems.org
Thu Feb 5 18:53:09 UTC 2026
Kinsey Moore started a new discussion on bsps/microblaze/microblaze_fpga/console/console-io.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/981#note_141779
> }
>
> - len = q - console;
> + node_path = path;
> + /* Resolve alias (e.g. "serial0") into an absolute path. */
> + if ( path[0] != '/' ) {
> + node_path = fdt_get_alias_namelen( fdt, path, strlen( path ) );
> + if ( node_path == NULL ) {
> + return 0;
> + }
> + }
>
> - /* Get the node specified by stdout-path */
> - offset = fdt_path_offset_namelen( fdt, console, len );
> + /* Find the console node using the resolved path. */
> + int offset = fdt_path_offset( fdt, node_path );
Variable definitions should remain at the top of the block. Same for `char *q` above.
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/981#note_141779
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260205/e34b13a4/attachment-0001.htm>
More information about the bugs
mailing list