mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-15 11:55:36 +08:00
rtemsbsd/open: Correctly open a mount directory
- If the open is for a directory and it is the root of the mounted file system open from the pseudo's root node.
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
@@ -279,7 +280,11 @@ test_walk_tree_unlink(walk_tree_dir state,
|
||||
static void
|
||||
test_setup(const char *base)
|
||||
{
|
||||
struct DIR *ddir;
|
||||
printf("test: nfs: setup\n");
|
||||
printf("test: nfs: opendir: %s\n", base);
|
||||
rtems_test_errno_assert((ddir = opendir(base)) != NULL);
|
||||
rtems_test_errno_assert(closedir(ddir) == 0);
|
||||
printf("test: nfs: chdir: %s\n", base);
|
||||
rtems_test_errno_assert(chdir(base) == 0);
|
||||
printf("test: nfs: mkdir: %s\n", test_top);
|
||||
|
Reference in New Issue
Block a user