]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - ip/iplink.c
iproute2 - Fix up and simplify variables pointing to install directories
[mirror_iproute2.git] / ip / iplink.c
index a58e4d06787a687eb9b3c7468ff9219d95a36499..679091e6831b71538cce495f6f13d6626bf49e0e 100644 (file)
@@ -34,7 +34,7 @@
 
 #define IPLINK_IOCTL_COMPAT    1
 #ifndef LIBDIR
-#define LIBDIR "/usr/lib/"
+#define LIBDIR "/usr/lib"
 #endif
 
 static void usage(void) __attribute__((noreturn));
@@ -134,9 +134,9 @@ struct link_util *get_link_kind(const char *id)
 
 int get_link_mode(const char *mode)
 {
-       if (strcmp(mode, "default") == 0)
+       if (strcasecmp(mode, "default") == 0)
                return IF_LINK_MODE_DEFAULT;
-       if (strcmp(mode, "dormant") == 0)
+       if (strcasecmp(mode, "dormant") == 0)
                return IF_LINK_MODE_DORMANT;
        return -1;
 }
@@ -433,7 +433,7 @@ int iplink_parse(int argc, char **argv, struct iplink_req *req,
                } else if (strcmp(*argv, "mode") == 0) {
                        int mode;
                        NEXT_ARG();
-                       mode =  get_link_mode(*argv);
+                       mode = get_link_mode(*argv);
                        if (mode < 0)
                                invarg("Invalid link mode\n", *argv);
                        addattr8(&req->n, sizeof(*req), IFLA_LINKMODE, mode);