From: Li Yang <liyang.fnst(a)cn.fujitsu.com>
Commonly there is a whilt line at the end of the virsh
command output, for example:
[root@localhost /]# virsh list --name --all
virt-tests-vm1
[root@localhost /]#
For now the output of secret-get-value like this:
[root@localhost /]# virsh secret-get-value b7811f0f-7fcb-d6b0-c12c-2d8807814b33
00111111001111110011111100111111
[root@localhost /]
So modify the codes, make output like this:
[root@localhost /]# virsh secret-get-value b7811f0f-7fcb-d6b0-c12c-2d8807814b33
00111111001111110011111100111111
[root@localhost /]
Signed-off-by: Li Yang <liyang.fnst(a)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
Show replies by date