提交 f82b959d 编写于 作者: J Jiri Pirko 提交者: David S. Miller

team: allow read/write-only options

Signed-off-by: NJiri Pirko <jpirko@redhat.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 596e2024
......@@ -346,6 +346,8 @@ static int team_option_get(struct team *team,
struct team_option_inst *opt_inst,
struct team_gsetter_ctx *ctx)
{
if (!opt_inst->option->getter)
return -EOPNOTSUPP;
return opt_inst->option->getter(team, ctx);
}
......@@ -355,6 +357,8 @@ static int team_option_set(struct team *team,
{
int err;
if (!opt_inst->option->setter)
return -EOPNOTSUPP;
err = opt_inst->option->setter(team, ctx);
if (err)
return err;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册