rtemsbsd/syscall: Set unitialised variable in open

The open path length was not set when at the root node and this
sometimes failed the current directory checks.
This commit is contained in:
Chris Johns
2023-08-06 15:45:21 +10:00
parent f55a3dd32f
commit fdde806c50

View File

@@ -918,6 +918,7 @@ rtems_bsd_sysgen_open_node(
if (rtems_bsd_libio_loc_to_vnode(&iop->pathinfo) ==
rtems_bsd_libio_loc_to_vnode(rootloc)) {
opath = ".";
opathlen = 1;
} else {
opath = path + strlen(path);
opathlen = 0;