diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2008-07-21 07:00:30 -0400 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2008-07-21 07:00:30 -0400 |
commit | 148acff615b403168cdf39e55bfcfaa6e4a7d233 (patch) | |
tree | e9879aecb1403f89ec1a6d37d2608dd9bf51e2ef | |
parent | 6ae2fa6718c398290be29ef740873640d25058b6 (diff) |
dm mpath: return parameter error
Return a specific error message if there are an invalid number of multipath
arguments.
This invalid command returns an "Unknown error" because the ti->error field is
not set
dmsetup create --table '0 2 multipath 0 0 1 1 round-robin 0 1 1 /dev/sdh' mpath0
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
-rw-r--r-- | drivers/md/dm-mpath.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index 9f570b2ab7b4..230d7890ec8a 100644 --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c | |||
@@ -625,8 +625,10 @@ static struct priority_group *parse_priority_group(struct arg_set *as, | |||
625 | struct pgpath *pgpath; | 625 | struct pgpath *pgpath; |
626 | struct arg_set path_args; | 626 | struct arg_set path_args; |
627 | 627 | ||
628 | if (as->argc < nr_params) | 628 | if (as->argc < nr_params) { |
629 | ti->error = "not enough path parameters"; | ||
629 | goto bad; | 630 | goto bad; |
631 | } | ||
630 | 632 | ||
631 | path_args.argc = nr_params; | 633 | path_args.argc = nr_params; |
632 | path_args.argv = as->argv; | 634 | path_args.argv = as->argv; |