diff options
author | jkoshy <jkoshy@FreeBSD.org> | 1998-07-14 09:19:47 +0000 |
---|---|---|
committer | jkoshy <jkoshy@FreeBSD.org> | 1998-07-14 09:19:47 +0000 |
commit | bf57a7d1d1e1af008a5e97eb56445f452973c8ed (patch) | |
tree | 6650417a777c837d43d3514e1e57956e43e09a28 /sbin/dump/main.c | |
parent | 7842d15da67480e9fd71e1d23e441ecdb599ad34 (diff) | |
download | FreeBSD-src-bf57a7d1d1e1af008a5e97eb56445f452973c8ed.zip FreeBSD-src-bf57a7d1d1e1af008a5e97eb56445f452973c8ed.tar.gz |
Make `dump' exit codes confirm to manual page.
PR: 5346
Style-check-by: bde
Diffstat (limited to 'sbin/dump/main.c')
-rw-r--r-- | sbin/dump/main.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/sbin/dump/main.c b/sbin/dump/main.c index 1e702c5..0807b58 100644 --- a/sbin/dump/main.c +++ b/sbin/dump/main.c @@ -42,7 +42,7 @@ static const char copyright[] = static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 5/1/95"; #endif static const char rcsid[] = - "$Id$"; + "$Id: main.c,v 1.16 1998/06/15 06:58:10 charnier Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -159,7 +159,7 @@ main(argc, argv) */ if ( ntrec > 64 ) { msg("please choose a blocksize <= 64\n"); - exit(X_ABORT); + exit(X_STARTUP); } break; @@ -200,7 +200,7 @@ main(argc, argv) if (spcl.c_ddate < 0) { (void)fprintf(stderr, "bad time \"%s\"\n", optarg); - exit(X_ABORT); + exit(X_STARTUP); } Tflag = 1; lastlevel = '?'; @@ -215,7 +215,7 @@ main(argc, argv) case 'W': /* what to do */ case 'w': lastdump(ch); - exit(0); /* do nothing else */ + exit(X_FINOK); /* do nothing else */ default: usage(); @@ -225,7 +225,7 @@ main(argc, argv) if (argc < 1) { (void)fprintf(stderr, "Must specify disk or filesystem\n"); - exit(X_ABORT); + exit(X_STARTUP); } disk = *argv++; argc--; @@ -234,12 +234,12 @@ main(argc, argv) while (argc--) (void)fprintf(stderr, " %s", *argv++); (void)fprintf(stderr, "\n"); - exit(X_ABORT); + exit(X_STARTUP); } if (Tflag && uflag) { (void)fprintf(stderr, "You cannot use the T and u flags together.\n"); - exit(X_ABORT); + exit(X_STARTUP); } if (strcmp(tape, "-") == 0) { pipeout++; @@ -272,13 +272,13 @@ main(argc, argv) #ifdef RDUMP if (index(tape, '\n')) { (void)fprintf(stderr, "invalid characters in tape\n"); - exit(X_ABORT); + exit(X_STARTUP); } if (rmthost(host) == 0) - exit(X_ABORT); + exit(X_STARTUP); #else (void)fprintf(stderr, "remote dump not enabled\n"); - exit(X_ABORT); + exit(X_STARTUP); #endif } (void)setuid(getuid()); /* rmthost() is the only reason to be setuid */ @@ -339,7 +339,7 @@ main(argc, argv) if ((diskfd = open(disk, O_RDONLY)) < 0) { msg("Cannot open %s\n", disk); - exit(X_ABORT); + exit(X_STARTUP); } sync(); sblock = (struct fs *)sblock_buf; @@ -506,7 +506,7 @@ usage() "nu] [-B records] [-b blocksize] [-d density] [-f file]\n" " [-h level] [-s feet] [-T date] filesystem\n" " dump [-W | -w]\n"); - exit(1); + exit(X_STARTUP); } /* |