]> git.proxmox.com Git - mirror_iproute2.git/commit
devlink: Refactor validation of finding required arguments
authorAya Levin <ayal@mellanox.com>
Thu, 28 Feb 2019 12:12:54 +0000 (14:12 +0200)
committerDavid Ahern <dsahern@gmail.com>
Thu, 28 Feb 2019 15:53:36 +0000 (07:53 -0800)
commitae72e655183b6f6872826360d855607d3d0a5617
treedc1817d206c4ba5ad8983e67afd773a63787a322
parent359f69f76ffb6029d37c49a95c2d08b5d48fc947
devlink: Refactor validation of finding required arguments

Introducing argument's metadata structure matching a bitmap flag per
required argument and an error message if missing. Using this static
array to refactor validation of finding required arguments in devlink
command line and to ease further maintenance.

Signed-off-by: Aya Levin <ayal@mellanox.com>
Reviewed-by: Moshe Shemesh <moshe@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
devlink/devlink.c