render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
Blob Blame History Raw
From 100eb35a80932cd9a162c38ecd2ab8b01894fb61 Mon Sep 17 00:00:00 2001
From: Mark McLoughlin <markmc@redhat.com>
Date: Mon, 17 Aug 2009 15:05:22 +0100
Subject: [PATCH] Cosmetic change to 'virsh nodedev-list --tree' output

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'

(cherry picked from commit 097c818bf00b3777778ffc32fea3a6ed1e741e2b)

Fedora-patch: libvirt-add-space-to-nodedev-list-tree.patch
---
 src/virsh.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/virsh.c b/src/virsh.c
index 94c3c4e..2d0cf81 100644
--- a/src/virsh.c
+++ b/src/virsh.c
@@ -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 */
-- 
1.6.2.5