diff options
-rw-r--r-- | ext2fs/ext2fs.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ext2fs/ext2fs.c b/ext2fs/ext2fs.c index 7b26b502..a0d6a64c 100644 --- a/ext2fs/ext2fs.c +++ b/ext2fs/ext2fs.c @@ -171,6 +171,8 @@ main (int argc, char **argv) mutex_init (&printf_lock); /* XXX */ + task_get_bootstrap_port (mach_task_self (), &bootstrap); + if (getpid () > 0) { int opt; @@ -205,14 +207,15 @@ main (int argc, char **argv) usage (1); } + if (bootstrap == MACH_PORT_NULL) + error (2, 0, "Must be started as a translator"); + device_name = argv[optind]; } else /* We are the bootstrap filesystem. */ device_name = diskfs_parse_bootargs (argc, argv); - task_get_bootstrap_port (mach_task_self (), &bootstrap); - /* Initialize the diskfs library. This must come before any other diskfs call. */ diskfs_init_diskfs (); @@ -298,11 +301,9 @@ main (int argc, char **argv) outside world. */ (void) diskfs_startup_diskfs (bootstrap); -#if 0 if (bootstrap == MACH_PORT_NULL) /* We are the bootstrap filesystem; do special boot-time setup. */ diskfs_start_bootstrap (argv); -#endif /* Now become a generic request thread. */ diskfs_main_request_loop (); |