529 |
{ |
{ |
530 |
volatile int err; |
volatile int err; |
531 |
int i; |
int i; |
532 |
|
int flags; |
533 |
mach_port_t consdev; |
mach_port_t consdev; |
534 |
struct argp argp = { options, parse_opt, 0, doc }; |
struct argp argp = { options, parse_opt, 0, doc }; |
535 |
|
|
536 |
/* Parse the arguments. We don't want the vector reordered, |
/* Parse the arguments. We don't want the vector reordered, we |
537 |
we should pass on to our child the exact arguments we got |
should pass on to our child the exact arguments we got and just |
538 |
and just ignore any arguments that aren't flags for us. */ |
ignore any arguments that aren't flags for us. ARGP_NO_ERRS |
539 |
argp_parse (&argp, argc, argv, ARGP_NO_ERRS|ARGP_IN_ORDER, 0, 0); |
suppresses --help and --version, so we only use that option if we |
540 |
|
are booting. */ |
541 |
|
flags = ARGP_IN_ORDER; |
542 |
|
if (getpid () == 0) |
543 |
|
flags |= ARGP_NO_ERRS; |
544 |
|
argp_parse (&argp, argc, argv, flags, 0, 0); |
545 |
|
|
546 |
if (getpid () > 0) |
if (getpid () > 0) |
547 |
error (2, 0, "can only be run by bootstrap filesystem"); |
error (2, 0, "can only be run by bootstrap filesystem"); |