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>
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;