command-line: Add function to print all options.
[cascardo/ovs.git] / utilities / ovs-dpctl.c
index 94a6b90..6d928af 100644 (file)
@@ -85,6 +85,7 @@ parse_options(int argc, char *argv[])
         {"more", no_argument, NULL, 'm'},
         {"timeout", required_argument, NULL, 't'},
         {"help", no_argument, NULL, 'h'},
+        {"option", no_argument, NULL, 'o'},
         {"version", no_argument, NULL, 'V'},
         VLOG_LONG_OPTIONS,
         {NULL, 0, NULL, 0},
@@ -130,6 +131,10 @@ parse_options(int argc, char *argv[])
         case 'h':
             usage(NULL);
 
+        case 'o':
+            print_options(long_options);
+            exit(EXIT_SUCCESS);
+
         case 'V':
             ovs_print_version(0, 0);
             exit(EXIT_SUCCESS);
@@ -184,4 +189,3 @@ usage(void *userdata OVS_UNUSED)
            "  -V, --version               display version information\n");
     exit(EXIT_SUCCESS);
 }
-