wipefs: fail if more device arguments specified

Currently wipefs process only first device argument and silently ignores
remaining.  Print error instead because it can be quite confusing.

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Milan Broz 2010-12-17 23:36:55 +01:00 committed by Karel Zak
parent 604eb2602c
commit 6ebe8f630a
1 changed files with 3 additions and 0 deletions

View File

@ -384,6 +384,9 @@ main(int argc, char **argv)
fname = argv[optind++];
if (optind != argc)
errx(EXIT_FAILURE, _("only one device as argument is currently supported."));
wp = read_offsets(wp, fname, all);
if (wp) {