From 40674fa5469c7af09095d5dd5cca8eccc728561c Mon Sep 17 00:00:00 2001 From: dzwdz Date: Sat, 30 Jul 2022 20:45:36 +0200 Subject: user: replace the MOUNT macro with MOUNT_AT The old style could be confused with a regular function, where the driver would be executed unconditionally. This should make it more obvious that the driver doesn't get executed in the parent process. --- src/user/app/init/init.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/user/app/init/init.c') diff --git a/src/user/app/init/init.c b/src/user/app/init/init.c index bb92cce..519329c 100644 --- a/src/user/app/init/init.c +++ b/src/user/app/init/init.c @@ -28,10 +28,10 @@ int main(void) { freopen("/kdev/com1", "a+", stdout); printf("in init (stage 2), main at 0x%x\n", &main); - MOUNT("/tmp/", tmpfs_drv()); - MOUNT("/keyboard", ps2_drv()); - MOUNT("/vga_tty", ansiterm_drv()); - MOUNT("/bin/", fs_passthru("/init/bin")); + MOUNT_AT("/tmp/") { tmpfs_drv(); } + MOUNT_AT("/keyboard") { ps2_drv(); } + MOUNT_AT("/vga_tty") { ansiterm_drv(); } + MOUNT_AT("/bin/") { fs_passthru("/init/bin"); } if (fork()) { /* used to trigger a kernel bug -- cgit v1.2.3