summaryrefslogtreecommitdiffstats
path: root/cli/src/cli-cmd-parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'cli/src/cli-cmd-parser.c')
-rw-r--r--cli/src/cli-cmd-parser.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c
index 7ddeb511c25..aead5f42727 100644
--- a/cli/src/cli-cmd-parser.c
+++ b/cli/src/cli-cmd-parser.c
@@ -1433,7 +1433,10 @@ cli_cmd_volume_top_parse (const char **words, int wordcount,
if (!ret)
blk_size = atoi (value);
if (ret || (blk_size <= 0)) {
- cli_out ("block size should be an integer "
+ if (blk_size < 0)
+ cli_out ("block size is an invalid number");
+ else
+ cli_out ("block size should be an integer "
"greater than zero");
ret = -1;
goto out;
@@ -1444,8 +1447,12 @@ cli_cmd_volume_top_parse (const char **words, int wordcount,
if (!ret)
count = atoi(value);
if (ret || (count <= 0)) {
- cli_out ("count should be an integer greater "
- "zero");
+ if (count < 0)
+ cli_out ("count is an invalid number");
+ else
+ cli_out ("count should be an integer "
+ "greater than zero");
+
ret = -1;
goto out;
}