summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuli Mallett <jmallett@FreeBSD.org>2003-01-19 01:02:25 +0000
committerJuli Mallett <jmallett@FreeBSD.org>2003-01-19 01:02:25 +0000
commit684d26ea290def3292fdb15ca061bc2b1b46ad3f (patch)
tree85c47950501ce02e5bb682186d4d2121cee961c6
parent656128586d46b1ce8ff315062a35f95d3fc97378 (diff)
Notes
-rw-r--r--sbin/dumpfs/dumpfs.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c
index 88d7b9afb6f1..697a36304e0d 100644
--- a/sbin/dumpfs/dumpfs.c
+++ b/sbin/dumpfs/dumpfs.c
@@ -91,26 +91,20 @@ void usage(void) __dead2;
int
main(int argc, char *argv[])
{
- struct fstab *fs;
- int ch, eval;
+ int eval;
- while ((ch = getopt(argc, argv, "")) != -1)
- switch(ch) {
- case '?':
- default:
- usage();
- }
+ eval = 0;
+
+ while (getopt(argc, argv, "") != -1)
+ usage();
argc -= optind;
argv += optind;
if (argc < 1)
usage();
- for (eval = 0; *argv; ++argv)
- if ((fs = getfsfile(*argv)) == NULL)
- eval |= dumpfs(*argv);
- else
- eval |= dumpfs(fs->fs_spec);
+ while (*argv != NULL)
+ eval |= dumpfs(*argv++);
exit(eval);
}