From: Theodore Ts'o Date: Mon, 13 Nov 2006 04:09:03 +0000 (-0500) Subject: Add explanatory message to badblocks that -n and -w are mutually exclusive X-Git-Tag: E2FSPROGS-1_40-WIP-1114~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d8b5f777438445407f7cd408bd5fe301e4687271;p=thirdparty%2Fe2fsprogs.git Add explanatory message to badblocks that -n and -w are mutually exclusive Addresses Debian Bug: #371869 Signed-off-by: "Theodore Ts'o" --- diff --git a/misc/ChangeLog b/misc/ChangeLog index fb50257c1..fdcf4ceb5 100644 --- a/misc/ChangeLog +++ b/misc/ChangeLog @@ -1,3 +1,10 @@ +2006-11-12 Theodore Tso + + * badblocks.c (exclusive_usage): Add an explicit usage message + explaining to the user that the -n and -w message may not + be specified at the same time. (Addresses Debian Bug: + #371869) + 2006-11-08 Theodore Tso * mke2fs.c (test_disk): Change the last_block argument passed to diff --git a/misc/badblocks.c b/misc/badblocks.c index 40962fb66..9867668cd 100644 --- a/misc/badblocks.c +++ b/misc/badblocks.c @@ -81,6 +81,13 @@ static void usage(void) exit (1); } +static void exclusive_usage(void) +{ + fprintf(stderr, + _("The -n and -w options are mutually exclusive.\n\n")); + usage(); +} + static unsigned long currently_testing = 0; static unsigned long num_blocks = 0; static ext2_badblocks_list bb_list = NULL; @@ -880,13 +887,13 @@ int main (int argc, char ** argv) break; case 'w': if (w_flag) - usage(); + exclusive_usage(); test_func = test_rw; w_flag = 1; break; case 'n': if (w_flag) - usage(); + exclusive_usage(); test_func = test_nd; w_flag = 2; break;