[PATCH 6/7] virsh: Fix a bug of nodedev-list

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

 



output of commands like '%virsh nodedev-list --tree --cap pci'
could be empty. Remove the useless checking.
---
 tools/virsh-nodedev.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/tools/virsh-nodedev.c b/tools/virsh-nodedev.c
index e784af1..cd88538 100644
--- a/tools/virsh-nodedev.c
+++ b/tools/virsh-nodedev.c
@@ -197,9 +197,8 @@ cmdNodeListDevices(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
             virNodeDeviceFree(dev);
         }
         for (i = 0 ; i < num_devices ; i++) {
-            if (parents[i] == NULL &&
-                vshTreePrint(ctl, vshNodeListLookup, &arrays, num_devices,
-                             i) < 0)
+            if (vshTreePrint(ctl, vshNodeListLookup,
+                             &arrays, num_devices, i) < 0)
                 ret = false;
         }
         for (i = 0 ; i < num_devices ; i++) {
-- 
1.7.7.3

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