File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed
Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -307,7 +307,26 @@ rt_err_t rt_ofw_console_setup(void)
307307
308308 if (err == - RT_ENOSYS && !rt_ofw_prop_read_string (ofw_node_chosen , "stdout-path" , & stdout_path ))
309309 {
310- struct rt_ofw_node * stdout_np = rt_ofw_find_node_by_path (stdout_path );
310+ struct rt_ofw_node * stdout_np ;
311+
312+ if (* stdout_path != '/' && ofw_node_aliases )
313+ {
314+ int alias_len ;
315+ struct rt_ofw_prop * prop ;
316+
317+ alias_len = strchrnul (stdout_path , ':' ) - stdout_path ;
318+
319+ rt_ofw_foreach_prop (ofw_node_aliases , prop )
320+ {
321+ if (!rt_strncmp (prop -> name , stdout_path , alias_len ))
322+ {
323+ stdout_path = prop -> value ;
324+ break ;
325+ }
326+ }
327+ }
328+
329+ stdout_np = rt_ofw_find_node_by_path (stdout_path );
311330
312331 if (stdout_np && (ofw_name = ofw_console_serial_find (con_name , stdout_np )))
313332 {
You can’t perform that action at this time.
0 commit comments