[PATCH 2/2] virsh: Properly reject 'floor' settings in cmdAttachInterface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



cmdAttachInterface doesn't support the 'floor' field that was added in
d7f5c88961b52 but that commit didn't properly reject it from
cmdAttachInterface where it's unused.
---
 tools/virsh-domain.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 9f54691..94e7a5c 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -963,8 +963,12 @@ cmdAttachInterface(vshControl *ctl, const vshCmd *cmd)
         memset(&inbound, 0, sizeof(inbound));
         if (vshParseRateStr(ctl, inboundStr, &inbound) < 0)
             goto cleanup;
-        if (!inbound.average && !inbound.floor) {
-            vshError(ctl, _("either inbound average or floor is mandatory"));
+        if (!inbound.average) {
+            vshError(ctl, _("inbound average is mandatory"));
+            goto cleanup;
+        }
+        if (inbound.floor) {
+            vshError(ctl, _("inbound floor is unsupported yet"));
             goto cleanup;
         }
     }
-- 
2.4.5

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]