From dad27a6c10c8de349071ede7d5d143604c210cd6 Mon Sep 17 00:00:00 2001 From: julian Date: Wed, 7 Aug 1996 00:39:41 +0000 Subject: Submitted by: archie@whistle.com slight cleanups --- sbin/i386/nextboot/nextboot.c | 13 ++++++------- sbin/nextboot/nextboot.c | 13 ++++++------- 2 files changed, 12 insertions(+), 14 deletions(-) (limited to 'sbin') diff --git a/sbin/i386/nextboot/nextboot.c b/sbin/i386/nextboot/nextboot.c index 47d4677..2398b56 100644 --- a/sbin/i386/nextboot/nextboot.c +++ b/sbin/i386/nextboot/nextboot.c @@ -45,15 +45,15 @@ static int eflag; static int dflag; static int nameblock = NAMEBLOCK; -char * myname; #define BOOT_MAGIC 0xAA55 +extern char *__progname; + static void usage(void) { - printf (" usage: %s [-b] device bootstring [bootstring] ...\n" - ,myname); - printf (" or: %s {-e,-d} device \n" - ,myname); - printf (" flags are mutually exclusive\n"); + fprintf (stderr, " usage: %s [-b] device bootstring [bootstring] ...\n" + , __progname); + fprintf (stderr, " or: %s {-e,-d} device \n" , __progname); + fprintf (stderr, "The -e and -d flags are mutually exclusive\n"); exit(1); } @@ -66,7 +66,6 @@ main (int argc, char** argv) int part; bflag = 0; - myname = argv[0]; while ((ch = getopt(argc, argv, "bde")) != EOF) { switch(ch) { case 'b': diff --git a/sbin/nextboot/nextboot.c b/sbin/nextboot/nextboot.c index 47d4677..2398b56 100644 --- a/sbin/nextboot/nextboot.c +++ b/sbin/nextboot/nextboot.c @@ -45,15 +45,15 @@ static int eflag; static int dflag; static int nameblock = NAMEBLOCK; -char * myname; #define BOOT_MAGIC 0xAA55 +extern char *__progname; + static void usage(void) { - printf (" usage: %s [-b] device bootstring [bootstring] ...\n" - ,myname); - printf (" or: %s {-e,-d} device \n" - ,myname); - printf (" flags are mutually exclusive\n"); + fprintf (stderr, " usage: %s [-b] device bootstring [bootstring] ...\n" + , __progname); + fprintf (stderr, " or: %s {-e,-d} device \n" , __progname); + fprintf (stderr, "The -e and -d flags are mutually exclusive\n"); exit(1); } @@ -66,7 +66,6 @@ main (int argc, char** argv) int part; bflag = 0; - myname = argv[0]; while ((ch = getopt(argc, argv, "bde")) != EOF) { switch(ch) { case 'b': -- cgit v1.1