[PATCH] tools: improve the error info when fail to parse parameter --soft-limit of memtune

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When set guest memory with a invalid parameter of --soft-limit, it posts weird error:

$ virsh memtune r7 --hard-limit 20417224 --soft-limit 9007199254740992  --swap-hard-limit 35417224
error: Unable to parse integer parameter 'NAME

Change it to

error: Unable to parse integer parameter soft-limit

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1211550
Signed-off-by: Shanzhi Yu <shyu@xxxxxxxxxx>
---
 tools/virsh-domain.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 3e2c420..ebdf398 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -8417,7 +8417,7 @@ cmdMemtune(vshControl *ctl, const vshCmd *cmd)
 
 #define PARSE_MEMTUNE_PARAM(NAME, FIELD)                                    \
     if ((rc = vshMemtuneGetSize(cmd, NAME, &tmpVal)) < 0) {                 \
-        vshError(ctl, "%s", _("Unable to parse integer parameter 'NAME'")); \
+        vshError(ctl, _("Unable to parse integer parameter %s"), NAME); \
         goto cleanup;                                                       \
     }                                                                       \
     if (rc == 1) {                                                          \
-- 
2.1.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]