]> git.proxmox.com Git - mirror_iproute2.git/blobdiff - bridge/bridge.c
bridge: fdb: Fix for missing keywords in non-JSON output
[mirror_iproute2.git] / bridge / bridge.c
index 7fcfe1116f6e5a204151fd468adf662ef3670550..ac4d6a14f510ea7ebd71321c7c3c4bb6070417ac 100644 (file)
@@ -30,7 +30,6 @@ int json;
 int timestamp;
 char *batch_file;
 int force;
-const char *_SL_;
 
 static void usage(void) __attribute__((noreturn));
 
@@ -42,7 +41,7 @@ static void usage(void)
 "where OBJECT := { link | fdb | mdb | vlan | monitor }\n"
 "      OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] |\n"
 "                   -o[neline] | -t[imestamp] | -n[etns] name |\n"
-"                   -c[ompressvlans] -color -p[retty] -j{son} }\n");
+"                   -c[ompressvlans] -color -p[retty] -j[son] }\n");
        exit(-1);
 }
 
@@ -173,8 +172,7 @@ main(int argc, char **argv)
                        NEXT_ARG();
                        if (netns_switch(argv[1]))
                                exit(-1);
-               } else if (matches(opt, "-color") == 0) {
-                       enable_color();
+               } else if (matches_color(opt, &color)) {
                } else if (matches(opt, "-compressvlans") == 0) {
                        ++compress_vlans;
                } else if (matches(opt, "-force") == 0) {
@@ -200,8 +198,7 @@ main(int argc, char **argv)
 
        _SL_ = oneline ? "\\" : "\n";
 
-       if (color && !json)
-               enable_color();
+       check_enable_color(color, json);
 
        if (batch_file)
                return batch(batch_file);