[PATCH 3/3] cmdAttachInterface: Fully implement @floor support

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

 



In my previous commit d7f5c88961b52 I tried to introduce support
for inbound.floor. But the code change was incomplete. This is
the change needed to fully enable the feature.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 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..c8b0e76 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -1023,12 +1023,16 @@ cmdAttachInterface(vshControl *ctl, const vshCmd *cmd)
     if (inboundStr || outboundStr) {
         virBufferAddLit(&buf, "<bandwidth>\n");
         virBufferAdjustIndent(&buf, 2);
-        if (inboundStr && inbound.average > 0) {
-            virBufferAsprintf(&buf, "<inbound average='%llu'", inbound.average);
+        if (inboundStr && (inbound.average || inbound.floor)) {
+            virBufferAddLit(&buf, "<inbound");
+            if (inbound.average > 0)
+                virBufferAsprintf(&buf, " average='%llu'", inbound.average);
             if (inbound.peak > 0)
                 virBufferAsprintf(&buf, " peak='%llu'", inbound.peak);
             if (inbound.burst > 0)
                 virBufferAsprintf(&buf, " burst='%llu'", inbound.burst);
+            if (inbound.floor > 0)
+                virBufferAsprintf(&buf, " floor='%llu'", inbound.floor);
             virBufferAddLit(&buf, "/>\n");
         }
         if (outboundStr && outbound.average > 0) {
-- 
2.4.6

--
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]