[libvirt] [PATCH 38/49] virsh: Fix a bug of nodedev-list

Osier Yang jyang at redhat.com
Fri Jul 20 14:25:28 UTC 2012


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

diff --git a/tools/virsh.c b/tools/virsh.c
index 8e191f4..8b85a7a 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -14213,9 +14213,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