From 916ee4e29c0c53fba6d9668d55e8ca38645a155e Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 19 Jan 1996 00:39:42 +0000 Subject: (usage, USAGE, options, debug_flag, debug_lock): Removed. (main): Don't bother parsing options, since we don't have any. --- pflocal/pflocal.c | 45 +++------------------------------------------ 1 file changed, 3 insertions(+), 42 deletions(-) diff --git a/pflocal/pflocal.c b/pflocal/pflocal.c index 7a92d22a..56ec622a 100644 --- a/pflocal/pflocal.c +++ b/pflocal/pflocal.c @@ -47,33 +47,6 @@ int trivfs_cntl_nportclasses = 1; /* ---------------------------------------------------------------- */ -#define USAGE "Usage: %s\n" - -static void -usage(int status) -{ - if (status != 0) - fprintf(stderr, "Try `%s --help' for more information.\n", - program_invocation_name); - else - { - printf(USAGE, program_invocation_name); - } - - exit(status); -} - -#define SHORT_OPTIONS "D&" - -static struct option options[] = -{ - {"debug", no_argument, 0, 'D'}, - {"help", no_argument, 0, '&'}, - {0, 0, 0, 0} -}; - -/* ---------------------------------------------------------------- */ - /* A demuxer to separate out pf-level operations on our node. */ static int pf_demuxer (mach_msg_header_t *inp, mach_msg_header_t *outp) @@ -82,27 +55,15 @@ pf_demuxer (mach_msg_header_t *inp, mach_msg_header_t *outp) return socket_server (inp, outp) || trivfs_demuxer (inp, outp); } -int debug_flag = 0; -spin_lock_t debug_lock = SPIN_LOCK_INITIALIZER; - void main(int argc, char *argv[]) { - int opt; error_t err; mach_port_t bootstrap; - while ((opt = getopt_long(argc, argv, SHORT_OPTIONS, options, 0)) != EOF) - switch (opt) - { - case 'D': debug_flag = 1; break; - case '&': usage(0); - default: usage(1); - } - - if (argv[optind] != NULL) + if (argc > 1) { - fprintf(stderr, USAGE, program_invocation_name); - usage(1); + fprintf(stderr, "Usage: %s\n", program_invocation_name); + exit (1); } task_get_bootstrap_port (mach_task_self (), &bootstrap); -- cgit v1.2.3