Whamcloud - gitweb
git://git.whamcloud.com
/
tools
/
e2fsprogs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
540e4ca
)
badblocks: avoid an error when -n or -w is specified twice
author
Theodore Ts'o
<tytso@mit.edu>
Thu, 28 Nov 2024 03:34:57 +0000
(22:34 -0500)
committer
Theodore Ts'o
<tytso@mit.edu>
Thu, 28 Nov 2024 03:34:57 +0000
(22:34 -0500)
Fix a bug where if the user specifies the -n or -w command-line option
twice, badblocks will issue a misleading (and incorrect) error
message.
Addresses-Debian-Bug: #1087341
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/badblocks.c
patch
|
blob
|
history
diff --git
a/misc/badblocks.c
b/misc/badblocks.c
index
2b5ff6d
..
2fc1b0d
100644
(file)
--- a/
misc/badblocks.c
+++ b/
misc/badblocks.c
@@
-1119,13
+1119,13
@@
int main (int argc, char ** argv)
v_flag++;
break;
case 'w':
- if (w_flag)
+ if (w_flag
&& w_flag != 1
)
exclusive_usage();
test_func = test_rw;
w_flag = 1;
break;
case 'n':
- if (w_flag)
+ if (w_flag
&& w_flag != 2
)
exclusive_usage();
test_func = test_nd;
w_flag = 2;