summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2023-08-06 15:45:21 +1000
committerChris Johns <chrisj@rtems.org>2023-08-06 15:45:21 +1000
commitfdde806c50ab2f70ef40ba061c5f216aac5bfe0f (patch)
tree52abfb220719a72b79d00a5f8a10b0c5f951aef6
parentnfs: Support multiple mounts with the same path basename (diff)
downloadrtems-libbsd-fdde806c50ab2f70ef40ba061c5f216aac5bfe0f.tar.bz2
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.
-rw-r--r--rtemsbsd/rtems/rtems-bsd-syscall-api.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/rtemsbsd/rtems/rtems-bsd-syscall-api.c b/rtemsbsd/rtems/rtems-bsd-syscall-api.c
index 81361e94..800aa323 100644
--- a/rtemsbsd/rtems/rtems-bsd-syscall-api.c
+++ b/rtemsbsd/rtems/rtems-bsd-syscall-api.c
@@ -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;