dummy: Make --enable-dummy=override replace all dpifs, netdevs by dummies.
[openvswitch] / vswitchd / ovs-vswitchd.c
index 2a86972657af4636dd53757a5ca0a2c1ebd6344d..1b9e26c57dca5945452b9c4d4e7e9e5c20602b0f 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2009, 2010, 2011 Nicira Networks
+/* Copyright (c) 2008, 2009, 2010, 2011, 2012 Nicira Networks
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -137,7 +137,7 @@ parse_options(int argc, char *argv[])
         STREAM_SSL_LONG_OPTIONS,
         {"peer-ca-cert", required_argument, NULL, OPT_PEER_CA_CERT},
         {"bootstrap-ca-cert", required_argument, NULL, OPT_BOOTSTRAP_CA_CERT},
-        {"enable-dummy", no_argument, NULL, OPT_ENABLE_DUMMY},
+        {"enable-dummy", optional_argument, NULL, OPT_ENABLE_DUMMY},
         {"disable-system", no_argument, NULL, OPT_DISABLE_SYSTEM},
         {NULL, 0, NULL, 0},
     };
@@ -183,7 +183,7 @@ parse_options(int argc, char *argv[])
             break;
 
         case OPT_ENABLE_DUMMY:
-            dummy_enable();
+            dummy_enable(optarg && !strcmp(optarg, "override"));
             break;
 
         case OPT_DISABLE_SYSTEM: