ovs-dpctl: Support more than one option for "add-if" command.
authorBen Pfaff <blp@nicira.com>
Fri, 4 Mar 2011 20:46:37 +0000 (12:46 -0800)
committerBen Pfaff <blp@nicira.com>
Fri, 4 Mar 2011 20:49:41 +0000 (12:49 -0800)
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.

Also corrects a typo in the manpage pointed out by Justin Pettit.

utilities/ovs-dpctl.8.in
utilities/ovs-dpctl.c

index 12fa27b..58b3ea0 100644 (file)
@@ -46,7 +46,7 @@ Deletes datapath \fIdp\fR.  If \fIdp\fR is associated with any network
 devices, they are automatically removed.
 .
 .TP
-\fBadd\-if \fIdp netdev\fR[\fIoption\fR...]...
+\fBadd\-if \fIdp netdev\fR[\fB,\fIoption\fR]...
 Adds each \fInetdev\fR to the set of network devices datapath
 \fIdp\fR monitors, where \fIdp\fR is the name of an existing
 datapath, and \fInetdev\fR is the name of one of the host's
index f79909a..658f6ba 100644 (file)
@@ -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;