diff options
Diffstat (limited to 'src/cmd')
-rw-r--r-- | src/cmd/shell/shell.c | 2 | ||||
-rw-r--r-- | src/cmd/tests/kernel/miscsyscall.c | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/cmd/shell/shell.c b/src/cmd/shell/shell.c index 3aeaca1..9afdb5c 100644 --- a/src/cmd/shell/shell.c +++ b/src/cmd/shell/shell.c @@ -57,7 +57,7 @@ void run_args(int argc, char **argv, struct redir *redir) { if (argc < 2) { fprintf(stderr, "shadow: missing path\n"); } else { - _sys_mount(HANDLE_NULLFS, argv[1], strlen(argv[1])); + _sys_mount(-1, argv[1], strlen(argv[1])); } } else if (!strcmp(argv[0], "procmnt")) { if (argc < 2) { diff --git a/src/cmd/tests/kernel/miscsyscall.c b/src/cmd/tests/kernel/miscsyscall.c index c7ce9e0..1317720 100644 --- a/src/cmd/tests/kernel/miscsyscall.c +++ b/src/cmd/tests/kernel/miscsyscall.c @@ -316,7 +316,11 @@ static void test_getnull(void) { test(_sys_getsize(h) == -ENOSYS); test(_sys_remove(h) == -ENOSYS); test(_sys_fs_respond(h, buf, 16, 0) == -EBADF); - test(_sys_mount(h, "/asdf", 5) == -EGENERIC); + + /* making some assumptions about the testing environment here... */ + test(_sys_open("/test", 5, OPEN_READ) != -EGENERIC); + test(_sys_mount(h, "/test", 5) == 0); + test(_sys_open("/test", 5, OPEN_READ) == -EGENERIC); close(h); close(h2); |