From 25608d9720000ba2f4b4a881ca2a8cf519404f96 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 4 Mar 2011 12:46:37 -0800 Subject: [PATCH] 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. --- utilities/ovs-dpctl.8.in | 2 +- utilities/ovs-dpctl.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/utilities/ovs-dpctl.8.in b/utilities/ovs-dpctl.8.in index 12fa27bf..58b3ea0e 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 f79909a1..658f6ba1 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; -- 2.30.2