[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220315031834.56676-2-wangjie125@huawei.com>
Date: Tue, 15 Mar 2022 11:18:33 +0800
From: Jie Wang <wangjie125@...wei.com>
To: <mkubecek@...e.cz>, <davem@...emloft.net>, <kuba@...nel.org>,
<wangjie125@...wei.com>
CC: <netdev@...r.kernel.org>, <huangguangbin2@...wei.com>,
<lipeng321@...wei.com>, <shenjian15@...wei.com>,
<moyufeng@...wei.com>, <linyunsheng@...wei.com>,
<tanhuazhong@...wei.com>, <salil.mehta@...wei.com>,
<chenhao288@...ilicon.com>
Subject: [RFC ethtool 1/2] ethtool: add has_input in struct cmdline_info to record cmdline params
In driver feature configuration scene, ethtool need to record the config
combination. So this patch add has_input to mark the features to be
configured.
Signed-off-by: Jie Wang <wangjie125@...wei.com>
---
ethtool.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/ethtool.c b/ethtool.c
index 5d718a2..e2b4e17 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -111,6 +111,8 @@ struct cmdline_info {
* For anything else, points to int and is set if the option is
* seen. */
void *seen_val;
+ /* indicate current input has this item */
+ u32 has_input;
};
struct feature_def {
@@ -244,6 +246,7 @@ static void parse_generic_cmdline(struct cmd_context *ctx,
if (!strcmp(info[idx].name, argp[i])) {
found = 1;
*changed = 1;
+ info[idx].has_input = 1;
if (info[idx].type != CMDL_FLAG &&
info[idx].seen_val)
*(int *)info[idx].seen_val = 1;
--
2.33.0
Powered by blists - more mailing lists