Don't increment optind until we've validated that argv[optind] is a
valid scrub/repair subcommand and do not need to complain about
argv[optind].
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Bill O'Donnell <billodo@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
break;
}
}
- optind++;
-
if (type < 0) {
printf(_("Unknown type '%s'.\n"), argv[optind]);
return command_usage(cmdinfo);
}
+ optind++;
switch (d->type) {
case ST_INODE: