diff options
author | Milan Broz | 2010-12-17 23:36:55 +0100 |
---|---|---|
committer | Karel Zak | 2010-12-30 23:14:55 +0100 |
commit | 6ebe8f630ad8f31cd0aca0636f73eb9b4ffe5aa2 (patch) | |
tree | 2250397e60b5b48e0418328d44b8073a31c14c74 | |
parent | hexdump: remove od functionality in favor to GNU coreutils od (diff) | |
download | kernel-qcow2-util-linux-6ebe8f630ad8f31cd0aca0636f73eb9b4ffe5aa2.tar.gz kernel-qcow2-util-linux-6ebe8f630ad8f31cd0aca0636f73eb9b4ffe5aa2.tar.xz kernel-qcow2-util-linux-6ebe8f630ad8f31cd0aca0636f73eb9b4ffe5aa2.zip |
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>
-rw-r--r-- | misc-utils/wipefs.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/misc-utils/wipefs.c b/misc-utils/wipefs.c index d3033446f..4ab361597 100644 --- a/misc-utils/wipefs.c +++ b/misc-utils/wipefs.c @@ -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) { |