[ovs-dev] [PATCH] ovs-dpctl: Support more than one option for "add-if" command.

Ben Pfaff blp at nicira.com
Fri Mar 4 20:41:17 UTC 2011


This "while" loop in do_add_if() is supposed to split up everything after
the interface name with ',' as the delimiter, but it didn't do that
correctly.
---
 utilities/ovs-dpctl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/utilities/ovs-dpctl.c b/utilities/ovs-dpctl.c
index f79909a..658f6ba 100644
--- a/utilities/ovs-dpctl.c
+++ b/utilities/ovs-dpctl.c
@@ -241,7 +241,7 @@ do_add_if(int argc OVS_UNUSED, char *argv[])
         }
 
         shash_init(&args);
-        while ((option = strtok_r(NULL, "", &save_ptr)) != NULL) {
+        while ((option = strtok_r(NULL, ",", &save_ptr)) != NULL) {
             char *save_ptr_2 = NULL;
             char *key, *value;
 
-- 
1.7.1





More information about the dev mailing list