Simplify the main function now that libufs will hunt for the disk for us.

This commit is contained in:
Juli Mallett 2003-01-19 01:02:25 +00:00
parent 656128586d
commit 684d26ea29
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=109507

View File

@ -91,26 +91,20 @@ void usage(void) __dead2;
int int
main(int argc, char *argv[]) main(int argc, char *argv[])
{ {
struct fstab *fs; int eval;
int ch, eval;
while ((ch = getopt(argc, argv, "")) != -1) eval = 0;
switch(ch) {
case '?': while (getopt(argc, argv, "") != -1)
default: usage();
usage();
}
argc -= optind; argc -= optind;
argv += optind; argv += optind;
if (argc < 1) if (argc < 1)
usage(); usage();
for (eval = 0; *argv; ++argv) while (*argv != NULL)
if ((fs = getfsfile(*argv)) == NULL) eval |= dumpfs(*argv++);
eval |= dumpfs(*argv);
else
eval |= dumpfs(fs->fs_spec);
exit(eval); exit(eval);
} }