[libvirt] [PATCH] virsh: Add a white line into secret-get-value output

liyang liyang.fnst at cn.fujitsu.com
Fri Apr 11 07:58:42 UTC 2014


From: Li Yang <liyang.fnst at cn.fujitsu.com>

Commonly there is a whilt line at the end of the virsh
command output, for example:
[root at localhost /]# virsh list --name --all
virt-tests-vm1

[root at localhost /]#

For now the output of secret-get-value like this:
[root at localhost /]# virsh secret-get-value b7811f0f-7fcb-d6b0-c12c-2d8807814b33
00111111001111110011111100111111
[root at localhost /]

So modify the codes, make output like this:
[root at localhost /]# virsh secret-get-value b7811f0f-7fcb-d6b0-c12c-2d8807814b33
00111111001111110011111100111111

[root at localhost /]

Signed-off-by: Li Yang <liyang.fnst at cn.fujitsu.com>
---
 tools/virsh-secret.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/virsh-secret.c b/tools/virsh-secret.c
index b5acfda..784fd3f 100644
--- a/tools/virsh-secret.c
+++ b/tools/virsh-secret.c
@@ -284,7 +284,7 @@ cmdSecretGetValue(vshControl *ctl, const vshCmd *cmd)
         vshError(ctl, "%s", _("Failed to allocate memory"));
         goto cleanup;
     }
-    vshPrint(ctl, "%s", base64);
+    vshPrint(ctl, "%s\n", base64);
     memset(base64, 0, strlen(base64));
     VIR_FREE(base64);
     ret = true;
-- 
1.7.1




More information about the libvir-list mailing list