]> xenbits.xensource.com Git - libvirt.git/commitdiff
Cosmetic change to 'virsh nodedev-list --tree' output
authorMark McLoughlin <markmc@redhat.com>
Mon, 17 Aug 2009 14:05:22 +0000 (15:05 +0100)
committerMark McLoughlin <markmc@redhat.com>
Tue, 18 Aug 2009 08:41:56 +0000 (09:41 +0100)
Maybe it's just me, but I try to select an item from the tree using
double-click and get annoyed when "+-" gets included in the selection.

* src/virsh.c: add a space between "+-" and the node device name
  in 'virsh nodedev-list --tree'

src/virsh.c

index 94c3c4ef0ab2e733d218588a49fd1321f8685827..2d0cf81916f9f065aa4593e1854ef08c020d5c45 100644 (file)
@@ -5370,6 +5370,8 @@ cmdNodeListDevicesPrint(vshControl *ctl,
     if (depth && depth < MAX_DEPTH) {
         indentBuf[indentIdx] = '+';
         indentBuf[indentIdx+1] = '-';
+        indentBuf[indentIdx+2] = ' ';
+        indentBuf[indentIdx+3] = '\0';
     }
 
     /* Print this device */
@@ -5398,7 +5400,7 @@ cmdNodeListDevicesPrint(vshControl *ctl,
     /* If there is a child device, then print another blank line */
     if (nextlastdev != -1) {
         vshPrint(ctl, "%s", indentBuf);
-        vshPrint(ctl, "  |\n");
+        vshPrint(ctl, " |\n");
     }
 
     /* Finally print all children */