From 7d2ae83a831347d87796655cf438241ebecbad91 Mon Sep 17 00:00:00 2001 From: Keith Bostic Date: Fri, 28 Apr 1995 17:17:10 -0800 Subject: [PATCH] prettiness police SCCS-vsn: sbin/dumpfs/dumpfs.c 8.3 --- usr/src/sbin/dumpfs/dumpfs.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/usr/src/sbin/dumpfs/dumpfs.c b/usr/src/sbin/dumpfs/dumpfs.c index 1e02458792..84fbc47274 100644 --- a/usr/src/sbin/dumpfs/dumpfs.c +++ b/usr/src/sbin/dumpfs/dumpfs.c @@ -12,7 +12,7 @@ static char copyright[] = #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)dumpfs.c 8.2 (Berkeley) %G%"; +static char sccsid[] = "@(#)dumpfs.c 8.3 (Berkeley) %G%"; #endif /* not lint */ #include @@ -21,13 +21,14 @@ static char sccsid[] = "@(#)dumpfs.c 8.2 (Berkeley) %G%"; #include #include -#include -#include +#include #include +#include #include #include #include #include +#include union { struct fs fs; @@ -56,7 +57,7 @@ main(argc, argv) register struct fstab *fs; int ch, eval; - while ((ch = getopt(argc, argv, "")) != EOF) + while ((ch = getopt(argc, argv, "")) != -1) switch(ch) { case '?': default: @@ -186,7 +187,7 @@ dumpfs(name) err: if (fd != -1) (void)close(fd); - (void)fprintf(stderr, "dumpfs: %s: %s\n", name, strerror(errno)); + warn("%s", name); return (1); }; @@ -203,7 +204,7 @@ dumpcg(name, fd, c) SEEK_SET)) == (off_t)-1) return (1); if (read(fd, &acg, afs.fs_bsize) != afs.fs_bsize) { - (void)fprintf(stderr, "dumpfs: %s: error reading cg\n", name); + warnx("%s: error reading cg", name); return (1); } printf("magic\t%x\ttell\t%qx\ttime\t%s", -- 2.20.1