]> xenbits.xensource.com Git - libvirt.git/commitdiff
vsh: Fix the incorrect environment variable prefix in error message
authorErik Skultety <eskultet@redhat.com>
Fri, 11 Nov 2016 12:39:45 +0000 (13:39 +0100)
committerErik Skultety <eskultet@redhat.com>
Fri, 11 Nov 2016 12:44:40 +0000 (13:44 +0100)
Unlike the other error messages in vshInitDebug, this one relied on a hardcoded
name of a variable instead of using the prefix of the tool calling the init
routine.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1393854

Signed-off-by: Erik Skultety <eskultet@redhat.com>
tools/vsh.c

index f7ba070e673ee1f63bff9b9ab2558e9dfb7f90d6..3ba09ddadb2115a940bc69723f86ad60b061e5e0 100644 (file)
@@ -3016,8 +3016,8 @@ vshInitDebug(vshControl *ctl)
             int debug;
             if (virStrToLong_i(debugEnv, NULL, 10, &debug) < 0 ||
                 debug < VSH_ERR_DEBUG || debug > VSH_ERR_ERROR) {
-                vshError(ctl, "%s",
-                         _("VSH_DEBUG not set with a valid numeric value"));
+                vshError(ctl, _("%s_DEBUG not set with a valid numeric value"),
+                         ctl->env_prefix);
             } else {
                 ctl->debug = debug;
             }