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

Osier Yang jyang at redhat.com
Wed Sep 5 05:34:12 UTC 2012


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




More information about the libvir-list mailing list