summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1995-03-31 23:23:29 +0000
committerMiles Bader <miles@gnu.org>1995-03-31 23:23:29 +0000
commit6346960da5e4b17507b24cb5ca834f52be4d7fdd (patch)
treed75448a8e86143c769ac119e7662f8b3eb5fc319
parentecc24ac1bcea4d08a11ebe824d1cd48962a99393 (diff)
Move the check for the bootstrap port after the args check, so that users can
run it from the shell to get a usage message.
-rw-r--r--trans/null.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/trans/null.c b/trans/null.c
index 3c6cb054..38d0053e 100644
--- a/trans/null.c
+++ b/trans/null.c
@@ -46,10 +46,6 @@ main (int argc, char **argv)
error_t err;
mach_port_t bootstrap, control, realnode;
struct trivfs_control *trivfs_control;
-
- task_get_bootstrap_port (mach_task_self (), &bootstrap);
- if (bootstrap == MACH_PORT_NULL)
- error(1, 0, "must be started as a translator");
if (argc == 2 &&
(strcmp(argv[1], "-z") == 0 || strcmp(argv[1], "--zero") == 0))
@@ -60,6 +56,10 @@ main (int argc, char **argv)
exit(1);
}
+ task_get_bootstrap_port (mach_task_self (), &bootstrap);
+ if (bootstrap == MACH_PORT_NULL)
+ error(1, 0, "must be started as a translator");
+
_libports_initialize();
/* Reply to our parent */