From 792cce309207b44b26fd925b9ca43d9ed5518651 Mon Sep 17 00:00:00 2001 From: Eric Sandeen Date: Thu, 12 Aug 2010 14:40:44 -0400 Subject: [PATCH] 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 --- misc/mke2fs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); } } -- 1.8.3.1