Message ID | 20230810140102.1604684-1-jiri@resnulli.us (mailing list archive) |
---|---|
State | Accepted |
Commit | 27724f3cbb8ae3b25e83f885e8f442dc94f5db1e |
Delegated to: | David Ahern |
Headers | show |
Series | [iproute2-next] devlink: accept "name" command line option instead of "trap"/"group" | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Not a local patch |
Hello: This patch was applied to iproute2/iproute2-next.git (main) by David Ahern <dsahern@kernel.org>: On Thu, 10 Aug 2023 16:01:02 +0200 you wrote: > From: Jiri Pirko <jiri@nvidia.com> > > It is common for all iproute2 apps to have command line option > names matching with show command outputs. However, that is not true > in case of trap and trap group devlink objects. > > Correct would be to have "trap" and "group" in the outputs, but that is > not possible to change now. Instead of that, accept "name" instead of > "trap" and "group" options. > > [...] Here is the summary with links: - [iproute2-next] devlink: accept "name" command line option instead of "trap"/"group" https://git.kernel.org/pub/scm/network/iproute2/iproute2-next.git/commit/?id=27724f3cbb8a You are awesome, thank you!
diff --git a/devlink/devlink.c b/devlink/devlink.c index 26513142f900..fe69f53cd2e1 100644 --- a/devlink/devlink.c +++ b/devlink/devlink.c @@ -2018,14 +2018,16 @@ static int dl_argv_parse(struct dl *dl, uint64_t o_required, if (err) return err; o_found |= DL_OPT_HEALTH_REPORTER_AUTO_DUMP; - } else if (dl_argv_match(dl, "trap") && + } else if ((dl_argv_match(dl, "trap") || + dl_argv_match(dl, "name")) && (o_all & DL_OPT_TRAP_NAME)) { dl_arg_inc(dl); err = dl_argv_str(dl, &opts->trap_name); if (err) return err; o_found |= DL_OPT_TRAP_NAME; - } else if (dl_argv_match(dl, "group") && + } else if ((dl_argv_match(dl, "group") || + dl_argv_match(dl, "name")) && (o_all & DL_OPT_TRAP_GROUP_NAME)) { dl_arg_inc(dl); err = dl_argv_str(dl, &opts->trap_group_name);