提交 148acff6 编写于 作者: M Mikulas Patocka 提交者: Alasdair G Kergon

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: NMikulas Patocka <mpatocka@redhat.com>
Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
上级 6ae2fa67
......@@ -625,8 +625,10 @@ static struct priority_group *parse_priority_group(struct arg_set *as,
struct pgpath *pgpath;
struct arg_set path_args;
if (as->argc < nr_params)
if (as->argc < nr_params) {
ti->error = "not enough path parameters";
goto bad;
}
path_args.argc = nr_params;
path_args.argv = as->argv;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册