]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
badblocks: print a more explanatory message when a parameter is too large
authorCorey Hickey <bugfood-c@fatooh.org>
Mon, 24 Jan 2022 01:23:39 +0000 (17:23 -0800)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 1 Feb 2023 16:37:01 +0000 (11:37 -0500)
commit5c04fdf8ce4dfc35cd36084d7feeca1a11dfedab
treeed3add71f2efbb11715938b601ed7ddee4b8c638
parentc4efea445e952c06a410cc3b0b89763cc4650fb7
badblocks: print a more explanatory message when a parameter is too large

Before:
$ misc/badblocks -w -b 4294967296 -c 1 /tmp/testfile.bin
misc/badblocks: invalid block size - 4294967296

After:
$ misc/badblocks -w -b 4294967296 -c 1 /tmp/testfile.bin
misc/badblocks: block size too large - 4294967296

The original error is retained for invalid arguments, e.g.:
$ misc/badblocks -w -b foo -c 1 /tmp/testfile.bin
misc/badblocks: invalid block size - foo

Signed-off-by: Corey Hickey <bugfood-c@fatooh.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/badblocks.c