From: Ben Pfaff Date: Fri, 4 Mar 2011 20:46:37 +0000 (-0800) Subject: ovs-dpctl: Support more than one option for "add-if" command. X-Git-Tag: v1.1.0~187 X-Git-Url: http://git.onelab.eu/?p=sliver-openvswitch.git;a=commitdiff_plain;h=25608d9720000ba2f4b4a881ca2a8cf519404f96 ovs-dpctl: Support more than one option for "add-if" command. 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. --- diff --git a/utilities/ovs-dpctl.8.in b/utilities/ovs-dpctl.8.in index 12fa27bfa..58b3ea0ea 100644 --- a/utilities/ovs-dpctl.8.in +++ b/utilities/ovs-dpctl.8.in @@ -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 diff --git a/utilities/ovs-dpctl.c b/utilities/ovs-dpctl.c index f79909a1f..658f6ba10 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;