Signed-off-by: Richard Alpe <richard.a...@ericsson.com>
---
 tipc/bearer.c | 21 ++-------------------
 1 file changed, 2 insertions(+), 19 deletions(-)

diff --git a/tipc/bearer.c b/tipc/bearer.c
index 30b54d9..32abad6 100644
--- a/tipc/bearer.c
+++ b/tipc/bearer.c
@@ -67,8 +67,7 @@ static void cmd_bearer_enable_udp_help(struct cmdl *cmdl)
                cmdl->argv[0]);
 }
 
-static int enable_l2_bearer(struct nlmsghdr *nlh, struct opt *opts,
-                           struct cmdl *cmdl)
+static int add_l2_bearer(struct nlmsghdr *nlh, struct opt *opts)
 {
        struct opt *opt;
        char id[TIPC_MAX_BEARER_NAME];
@@ -286,7 +285,7 @@ static int cmd_bearer_enable(struct nlmsghdr *nlh, const 
struct cmd *cmd,
                        cmd_bearer_enable_l2_help(cmdl);
                        return -EINVAL;
                }
-               if ((err = enable_l2_bearer(nlh, opts, cmdl)))
+               if ((err = add_l2_bearer(nlh, opts)))
                        return err;
        } else {
                fprintf(stderr, "error, invalid media type \"%s\"\n", media);
@@ -298,22 +297,6 @@ static int cmd_bearer_enable(struct nlmsghdr *nlh, const 
struct cmd *cmd,
        return msg_doit(nlh, NULL, NULL);
 }
 
-static int add_l2_bearer(struct nlmsghdr *nlh, struct opt *opts)
-{
-       struct opt *opt;
-       char id[TIPC_MAX_BEARER_NAME];
-
-       if (!(opt = get_opt(opts, "device"))) {
-               fprintf(stderr, "error: missing bearer device\n");
-               return -EINVAL;
-       }
-       snprintf(id, sizeof(id), "eth:%s", opt->val);
-
-       mnl_attr_put_strz(nlh, TIPC_NLA_BEARER_NAME, id);
-
-       return 0;
-}
-
 static int add_udp_bearer(struct nlmsghdr *nlh, struct opt *opts)
 {
        struct opt *opt;
-- 
2.1.4


------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
tipc-discussion mailing list
tipc-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tipc-discussion

Reply via email to