On 20/7/2023 5:24 pm, Cedric Berger wrote: > On 20.07.23 07:45, chr...@rtems.org wrote: > >> From: Chris Johns <chr...@rtems.org> >> >> The kernel open call requires a path so to open a file we need to >> set the current directory to the parent vnode. If the open mode is >> create the path info vnode is the directory to perform the open >> create in. Using the parent node creates the file in wrong path. >> >> Updates #4723 >> --- >> rtemsbsd/rtems/rtems-bsd-syscall-api.c | 24 ++++++--- >> testsuite/nfs01/test_main.c | 75 ++++++++++++++++---------- >> 2 files changed, 64 insertions(+), 35 deletions(-) >> >> diff --git a/rtemsbsd/rtems/rtems-bsd-syscall-api.c >> b/rtemsbsd/rtems/rtems-bsd-syscall-api.c >> index 76fc8ad7..cfceb768 100644 >> --- a/rtemsbsd/rtems/rtems-bsd-syscall-api.c >> +++ b/rtemsbsd/rtems/rtems-bsd-syscall-api.c >> @@ -931,9 +931,18 @@ rtems_bsd_sysgen_open_node( >> } else { >> rtems_filesystem_location_info_t *rootloc = >> &iop->pathinfo.mt_entry->mt_fs_root->location; >> + /* >> + * We need the parent directory so open can find the >> + * the entry. If we are creating the file the pathinfo > > the the
Yeah and thanks for the review. I think this should be: /* * We need the parent directory so open can find the * entry. If we are creating the file the pathinfo * vnode entry is the directory to open uses to create * the file in. */ Chris _______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel