From: Eric Sandeen Date: Thu, 12 Aug 2010 18:40:44 +0000 (-0400) Subject: mke2fs: make "invalid blocks count" error more clear X-Git-Tag: v1.41.13~31 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=792cce309207b44b26fd925b9ca43d9ed5518651;p=tools%2Fe2fsprogs.git mke2fs: make "invalid blocks count" error more clear Mistakes on the commandline can lead to odd error messages: # mke2fs -t ext4 -E stride=128 stripe-width=512 /dev/sda1 mke2fs: invalid blocks count - /dev/sda1 Making it a bit more explicit is more obvious: mke2fs: invalid blocks count '/dev/sda1' on device 'stripe-width=512' (hint, the mistake was no comma separation for -E) Reported-by: Adam Huffman Signed-off-by: Eric Sandeen Signed-off-by: Theodore Ts'o --- diff --git a/misc/mke2fs.c b/misc/mke2fs.c index 7c337a0..08fab41 100644 --- a/misc/mke2fs.c +++ b/misc/mke2fs.c @@ -1462,8 +1462,9 @@ static void PRS(int argc, char *argv[]) fs_param.s_blocks_count = parse_num_blocks(argv[optind++], fs_param.s_log_block_size); if (!fs_param.s_blocks_count) { - com_err(program_name, 0, _("invalid blocks count - %s"), - argv[optind - 1]); + com_err(program_name, 0, + _("invalid blocks count '%s' on device '%s'"), + argv[optind - 1], device_name); exit(1); } }