[PATCH 08/13] virsh: Do not require \n in vshDebug messages

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

 



Having to put a newline at the end of each debug message in virsh has
always felt strange.

Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
---
 tools/virsh-domain-monitor.c |  2 +-
 tools/virsh-domain.c         | 32 ++++++++++++++++----------------
 tools/virsh-interface.c      |  6 +++---
 tools/virsh-network.c        | 10 +++++-----
 tools/virsh-nwfilter.c       | 10 +++++-----
 tools/virsh-pool.c           | 10 +++++-----
 tools/virsh-secret.c         |  2 +-
 tools/virsh-util.c           |  8 ++++----
 tools/virsh-volume.c         | 20 ++++++++++----------
 tools/virsh.c                |  4 ++--
 tools/virt-admin.c           |  2 +-
 tools/vsh.c                  |  8 ++++----
 12 files changed, 57 insertions(+), 57 deletions(-)

diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c
index 9ee9090c11..76843005b2 100644
--- a/tools/virsh-domain-monitor.c
+++ b/tools/virsh-domain-monitor.c
@@ -1224,7 +1224,7 @@ cmdDominfo(vshControl *ctl, const vshCmd *cmd)
 
     /* Check and display whether the domain is persistent or not */
     persistent = virDomainIsPersistent(dom);
-    vshDebug(ctl, VSH_ERR_DEBUG, "Domain persistent flag value: %d\n",
+    vshDebug(ctl, VSH_ERR_DEBUG, "Domain persistent flag value: %d",
              persistent);
     if (persistent < 0)
         vshPrint(ctl, "%-15s %s\n", _("Persistent:"), _("unknown"));
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index f3da2f903f..171bc0ce17 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -4254,7 +4254,7 @@ virshWatchTimeout(gpointer opaque)
     struct virshWatchData *data = opaque;
 
     /* suspend the domain when migration timeouts. */
-    vshDebug(data->ctl, VSH_ERR_DEBUG, "watchJob: timeout\n");
+    vshDebug(data->ctl, VSH_ERR_DEBUG, "watchJob: timeout");
     if (data->timeout_func)
         (data->timeout_func)(data->ctl, data->dom, data->opaque);
 
@@ -4266,7 +4266,7 @@ static void
 virshWatchSetTimeout(struct virshWatchData *data)
 {
     vshDebug(data->ctl, VSH_ERR_DEBUG,
-             "watchJob: setting timeout of %d secs\n", data->timeout_secs);
+             "watchJob: setting timeout of %d secs", data->timeout_secs);
 
     data->timeout_src = g_timeout_source_new_seconds(data->timeout_secs);
     g_source_set_callback(data->timeout_src,
@@ -4291,7 +4291,7 @@ virshWatchProgress(gpointer opaque)
     pthread_sigmask(SIG_BLOCK, &sigmask, &oldsigmask);
 #endif /* !WIN32 */
     vshDebug(data->ctl, VSH_ERR_DEBUG, "%s",
-             "watchJob: progress update\n");
+             "watchJob: progress update");
     ret = virDomainGetJobInfo(data->dom, &jobinfo);
 #ifndef WIN32
     pthread_sigmask(SIG_SETMASK, &oldsigmask, NULL);
@@ -4308,7 +4308,7 @@ virshWatchProgress(gpointer opaque)
             vshTTYDisableInterrupt(data->ctl);
             data->jobStarted = true;
             vshDebug(data->ctl, VSH_ERR_DEBUG,
-                     "watchJob: job started\n");
+                     "watchJob: job started");
         }
 
         if (data->jobStarted) {
@@ -4317,7 +4317,7 @@ virshWatchProgress(gpointer opaque)
                     virshWatchSetTimeout(data);
             } else if (!data->verbose) {
                 vshDebug(data->ctl, VSH_ERR_DEBUG,
-                         "watchJob: disabling callback\n");
+                         "watchJob: disabling callback");
                 return G_SOURCE_REMOVE;
             }
         }
@@ -4339,7 +4339,7 @@ virshWatchInterrupt(GIOChannel *source G_GNUC_UNUSED,
     gsize nread = 0;
 
     vshDebug(data->ctl, VSH_ERR_DEBUG,
-             "watchJob: stdin data %d\n", condition);
+             "watchJob: stdin data %d", condition);
     if (condition & G_IO_IN) {
         g_io_channel_read_chars(data->stdin_ioc,
                                 &retchar,
@@ -4348,7 +4348,7 @@ virshWatchInterrupt(GIOChannel *source G_GNUC_UNUSED,
                                 NULL);
 
         vshDebug(data->ctl, VSH_ERR_DEBUG,
-                 "watchJob: got %zu characters\n", nread);
+                 "watchJob: got %zu characters", nread);
         if (nread == 1 &&
             vshTTYIsInterruptCharacter(data->ctl, retchar)) {
             virDomainAbortJob(data->dom);
@@ -4407,7 +4407,7 @@ virshWatchJob(vshControl *ctl,
     /* don't poll on STDIN if we are not using a terminal */
     if (vshTTYAvailable(ctl)) {
         vshDebug(ctl, VSH_ERR_DEBUG, "%s",
-                 "watchJob: on TTY, enabling Ctrl-c processing\n");
+                 "watchJob: on TTY, enabling Ctrl-c processing");
 #ifdef WIN32
         data.stdin_ioc = g_io_channel_win32_new_fd(STDIN_FILENO);
 #else
@@ -4429,7 +4429,7 @@ virshWatchJob(vshControl *ctl,
     g_main_loop_run(eventLoop);
 
     vshDebug(ctl, VSH_ERR_DEBUG,
-             "watchJob: job done, status %d\n", *job_err);
+             "watchJob: job done, status %d", *job_err);
     if (*job_err == 0 && verbose) /* print [100 %] */
         virshPrintJobProgress(label, 0, 1);
 
@@ -6118,7 +6118,7 @@ cmdDomjobinfo(vshControl *ctl, const vshCmd *cmd)
                      _("Optional flags or --rawstats are not supported by the daemon"));
             goto cleanup;
         }
-        vshDebug(ctl, VSH_ERR_DEBUG, "detailed statistics not supported\n");
+        vshDebug(ctl, VSH_ERR_DEBUG, "detailed statistics not supported");
         vshResetLibvirtError();
         rc = virDomainGetJobInfo(dom, &info);
     }
@@ -11158,16 +11158,16 @@ virshMigrateTimeout(vshControl *ctl,
     case VIRSH_MIGRATE_TIMEOUT_DEFAULT: /* unreachable */
     case VIRSH_MIGRATE_TIMEOUT_SUSPEND:
         vshDebug(ctl, VSH_ERR_DEBUG,
-                 "migration timed out; suspending domain\n");
+                 "migration timed out; suspending domain");
         if (virDomainSuspend(dom) < 0)
-            vshDebug(ctl, VSH_ERR_INFO, "suspending domain failed\n");
+            vshDebug(ctl, VSH_ERR_INFO, "suspending domain failed");
         break;
 
     case VIRSH_MIGRATE_TIMEOUT_POSTCOPY:
         vshDebug(ctl, VSH_ERR_DEBUG,
-                 "migration timed out; switching to post-copy\n");
+                 "migration timed out; switching to post-copy");
         if (virDomainMigrateStartPostCopy(dom, 0) < 0)
-            vshDebug(ctl, VSH_ERR_INFO, "switching to post-copy failed\n");
+            vshDebug(ctl, VSH_ERR_INFO, "switching to post-copy failed");
         break;
     }
 }
@@ -11182,10 +11182,10 @@ virshMigrateIteration(virConnectPtr conn G_GNUC_UNUSED,
 
     if (iteration == 2) {
         vshDebug(ctl, VSH_ERR_DEBUG,
-                 "iteration %d finished; switching to post-copy\n",
+                 "iteration %d finished; switching to post-copy",
                  iteration - 1);
         if (virDomainMigrateStartPostCopy(dom, 0) < 0)
-            vshDebug(ctl, VSH_ERR_INFO, "switching to post-copy failed\n");
+            vshDebug(ctl, VSH_ERR_INFO, "switching to post-copy failed");
     }
 }
 
diff --git a/tools/virsh-interface.c b/tools/virsh-interface.c
index fda6d55158..7e3103adf1 100644
--- a/tools/virsh-interface.c
+++ b/tools/virsh-interface.c
@@ -61,7 +61,7 @@ virshCommandOptInterfaceBy(vshControl *ctl, const vshCmd *cmd,
     if (vshCommandOptString(ctl, cmd, optname, &n) < 0)
         return NULL;
 
-    vshDebug(ctl, VSH_ERR_INFO, "%s: found option <%s>: %s\n",
+    vshDebug(ctl, VSH_ERR_INFO, "%s: found option <%s>: %s",
              cmd->def->name, optname, n);
 
     if (name)
@@ -72,13 +72,13 @@ virshCommandOptInterfaceBy(vshControl *ctl, const vshCmd *cmd,
 
     /* try it by NAME */
     if (!is_mac && (flags & VIRSH_BYNAME)) {
-        vshDebug(ctl, VSH_ERR_DEBUG, "%s: <%s> trying as interface NAME\n",
+        vshDebug(ctl, VSH_ERR_DEBUG, "%s: <%s> trying as interface NAME",
                  cmd->def->name, optname);
         iface = virInterfaceLookupByName(priv->conn, n);
 
     /* try it by MAC */
     } else if (is_mac && (flags & VIRSH_BYMAC)) {
-        vshDebug(ctl, VSH_ERR_DEBUG, "%s: <%s> trying as interface MAC\n",
+        vshDebug(ctl, VSH_ERR_DEBUG, "%s: <%s> trying as interface MAC",
                  cmd->def->name, optname);
         iface = virInterfaceLookupByMACString(priv->conn, n);
     }
diff --git a/tools/virsh-network.c b/tools/virsh-network.c
index 6fcc7fd8ee..da396c0002 100644
--- a/tools/virsh-network.c
+++ b/tools/virsh-network.c
@@ -68,7 +68,7 @@ virshCommandOptNetworkBy(vshControl *ctl, const vshCmd *cmd,
     if (vshCommandOptString(ctl, cmd, optname, &n) < 0)
         return NULL;
 
-    vshDebug(ctl, VSH_ERR_INFO, "%s: found option <%s>: %s\n",
+    vshDebug(ctl, VSH_ERR_INFO, "%s: found option <%s>: %s",
              cmd->def->name, optname, n);
 
     if (name)
@@ -76,13 +76,13 @@ virshCommandOptNetworkBy(vshControl *ctl, const vshCmd *cmd,
 
     /* try it by UUID */
     if ((flags & VIRSH_BYUUID) && strlen(n) == VIR_UUID_STRING_BUFLEN-1) {
-        vshDebug(ctl, VSH_ERR_DEBUG, "%s: <%s> trying as network UUID\n",
+        vshDebug(ctl, VSH_ERR_DEBUG, "%s: <%s> trying as network UUID",
                  cmd->def->name, optname);
         network = virNetworkLookupByUUIDString(priv->conn, n);
     }
     /* try it by NAME */
     if (!network && (flags & VIRSH_BYNAME)) {
-        vshDebug(ctl, VSH_ERR_DEBUG, "%s: <%s> trying as network NAME\n",
+        vshDebug(ctl, VSH_ERR_DEBUG, "%s: <%s> trying as network NAME",
                  cmd->def->name, optname);
         network = virNetworkLookupByName(priv->conn, n);
     }
@@ -106,13 +106,13 @@ virshCommandOptNetworkPort(vshControl *ctl, const vshCmd *cmd,
     if (vshCommandOptString(ctl, cmd, optname, &n) < 0)
         return NULL;
 
-    vshDebug(ctl, VSH_ERR_INFO, "%s: found option <%s>: %s\n",
+    vshDebug(ctl, VSH_ERR_INFO, "%s: found option <%s>: %s",
              cmd->def->name, optname, n);
 
     if (name)
         *name = n;
 
-    vshDebug(ctl, VSH_ERR_DEBUG, "%s: <%s> trying as network UUID\n",
+    vshDebug(ctl, VSH_ERR_DEBUG, "%s: <%s> trying as network UUID",
              cmd->def->name, optname);
     port = virNetworkPortLookupByUUIDString(net, n);
 
diff --git a/tools/virsh-nwfilter.c b/tools/virsh-nwfilter.c
index 56133d6566..3745abb67e 100644
--- a/tools/virsh-nwfilter.c
+++ b/tools/virsh-nwfilter.c
@@ -41,7 +41,7 @@ virshCommandOptNWFilterBy(vshControl *ctl, const vshCmd *cmd,
     if (vshCommandOptString(ctl, cmd, optname, &n) < 0)
         return NULL;
 
-    vshDebug(ctl, VSH_ERR_INFO, "%s: found option <%s>: %s\n",
+    vshDebug(ctl, VSH_ERR_INFO, "%s: found option <%s>: %s",
              cmd->def->name, optname, n);
 
     if (name)
@@ -49,13 +49,13 @@ virshCommandOptNWFilterBy(vshControl *ctl, const vshCmd *cmd,
 
     /* try it by UUID */
     if ((flags & VIRSH_BYUUID) && strlen(n) == VIR_UUID_STRING_BUFLEN-1) {
-        vshDebug(ctl, VSH_ERR_DEBUG, "%s: <%s> trying as nwfilter UUID\n",
+        vshDebug(ctl, VSH_ERR_DEBUG, "%s: <%s> trying as nwfilter UUID",
                  cmd->def->name, optname);
         nwfilter = virNWFilterLookupByUUIDString(priv->conn, n);
     }
     /* try it by NAME */
     if (!nwfilter && (flags & VIRSH_BYNAME)) {
-        vshDebug(ctl, VSH_ERR_DEBUG, "%s: <%s> trying as nwfilter NAME\n",
+        vshDebug(ctl, VSH_ERR_DEBUG, "%s: <%s> trying as nwfilter NAME",
                  cmd->def->name, optname);
         nwfilter = virNWFilterLookupByName(priv->conn, n);
     }
@@ -450,13 +450,13 @@ virshCommandOptNWFilterBindingBy(vshControl *ctl,
     if (vshCommandOptString(ctl, cmd, optname, &n) < 0)
         return NULL;
 
-    vshDebug(ctl, VSH_ERR_INFO, "%s: found option <%s>: %s\n",
+    vshDebug(ctl, VSH_ERR_INFO, "%s: found option <%s>: %s",
              cmd->def->name, optname, n);
 
     if (name)
         *name = n;
 
-    vshDebug(ctl, VSH_ERR_DEBUG, "%s: <%s> trying as nwfilter binding port dev\n",
+    vshDebug(ctl, VSH_ERR_DEBUG, "%s: <%s> trying as nwfilter binding port dev",
              cmd->def->name, optname);
     binding = virNWFilterBindingLookupByPortDev(priv->conn, n);
 
diff --git a/tools/virsh-pool.c b/tools/virsh-pool.c
index 4cd7b7ba0b..33b130564e 100644
--- a/tools/virsh-pool.c
+++ b/tools/virsh-pool.c
@@ -186,7 +186,7 @@ virshCommandOptPoolBy(vshControl *ctl, const vshCmd *cmd, const char *optname,
     if (cmd->skipChecks && !n)
         return NULL;
 
-    vshDebug(ctl, VSH_ERR_INFO, "%s: found option <%s>: %s\n",
+    vshDebug(ctl, VSH_ERR_INFO, "%s: found option <%s>: %s",
              cmd->def->name, optname, n);
 
     if (name)
@@ -194,13 +194,13 @@ virshCommandOptPoolBy(vshControl *ctl, const vshCmd *cmd, const char *optname,
 
     /* try it by UUID */
     if ((flags & VIRSH_BYUUID) && strlen(n) == VIR_UUID_STRING_BUFLEN-1) {
-        vshDebug(ctl, VSH_ERR_DEBUG, "%s: <%s> trying as pool UUID\n",
+        vshDebug(ctl, VSH_ERR_DEBUG, "%s: <%s> trying as pool UUID",
                  cmd->def->name, optname);
         pool = virStoragePoolLookupByUUIDString(priv->conn, n);
     }
     /* try it by NAME */
     if (!pool && (flags & VIRSH_BYNAME)) {
-        vshDebug(ctl, VSH_ERR_DEBUG, "%s: <%s> trying as pool NAME\n",
+        vshDebug(ctl, VSH_ERR_DEBUG, "%s: <%s> trying as pool NAME",
                  cmd->def->name, optname);
         pool = virStoragePoolLookupByName(priv->conn, n);
     }
@@ -1211,7 +1211,7 @@ cmdPoolList(vshControl *ctl, const vshCmd *cmd G_GNUC_UNUSED)
         /* Retrieve the persistence status of the pool */
         if (details) {
             persistent = virStoragePoolIsPersistent(list->pools[i]);
-            vshDebug(ctl, VSH_ERR_DEBUG, "Persistent flag value: %d\n",
+            vshDebug(ctl, VSH_ERR_DEBUG, "Persistent flag value: %d",
                      persistent);
             if (persistent < 0)
                 poolInfoTexts[i].persistent = g_strdup(_("unknown"));
@@ -1545,7 +1545,7 @@ cmdPoolInfo(vshControl *ctl, const vshCmd *cmd)
 
         /* Check and display whether the pool is persistent or not */
         persistent = virStoragePoolIsPersistent(pool);
-        vshDebug(ctl, VSH_ERR_DEBUG, "Pool persistent flag value: %d\n",
+        vshDebug(ctl, VSH_ERR_DEBUG, "Pool persistent flag value: %d",
                  persistent);
         if (persistent < 0)
             vshPrint(ctl, "%-15s %s\n", _("Persistent:"),  _("unknown"));
diff --git a/tools/virsh-secret.c b/tools/virsh-secret.c
index 6655d3211e..7c81c10845 100644
--- a/tools/virsh-secret.c
+++ b/tools/virsh-secret.c
@@ -45,7 +45,7 @@ virshCommandOptSecret(vshControl *ctl, const vshCmd *cmd, const char **name)
         return NULL;
 
     vshDebug(ctl, VSH_ERR_DEBUG,
-             "%s: found option <%s>: %s\n", cmd->def->name, optname, n);
+             "%s: found option <%s>: %s", cmd->def->name, optname, n);
 
     if (name != NULL)
         *name = n;
diff --git a/tools/virsh-util.c b/tools/virsh-util.c
index ab350f0326..55ab71f26a 100644
--- a/tools/virsh-util.c
+++ b/tools/virsh-util.c
@@ -39,7 +39,7 @@ virshLookupDomainInternal(vshControl *ctl,
     /* try it by ID */
     if (flags & VIRSH_BYID) {
         if (virStrToLong_i(name, NULL, 10, &id) == 0 && id >= 0) {
-            vshDebug(ctl, VSH_ERR_DEBUG, "%s: <domain> looks like ID\n",
+            vshDebug(ctl, VSH_ERR_DEBUG, "%s: <domain> looks like ID",
                      cmdname);
             dom = virDomainLookupByID(priv->conn, id);
         }
@@ -48,14 +48,14 @@ virshLookupDomainInternal(vshControl *ctl,
     /* try it by UUID */
     if (!dom && (flags & VIRSH_BYUUID) &&
         strlen(name) == VIR_UUID_STRING_BUFLEN-1) {
-        vshDebug(ctl, VSH_ERR_DEBUG, "%s: <domain> trying as domain UUID\n",
+        vshDebug(ctl, VSH_ERR_DEBUG, "%s: <domain> trying as domain UUID",
                  cmdname);
         dom = virDomainLookupByUUIDString(priv->conn, name);
     }
 
     /* try it by NAME */
     if (!dom && (flags & VIRSH_BYNAME)) {
-        vshDebug(ctl, VSH_ERR_DEBUG, "%s: <domain> trying as domain NAME\n",
+        vshDebug(ctl, VSH_ERR_DEBUG, "%s: <domain> trying as domain NAME",
                  cmdname);
         dom = virDomainLookupByName(priv->conn, name);
     }
@@ -90,7 +90,7 @@ virshCommandOptDomainBy(vshControl *ctl,
     if (vshCommandOptString(ctl, cmd, optname, &n) < 0)
         return NULL;
 
-    vshDebug(ctl, VSH_ERR_INFO, "%s: found option <%s>: %s\n",
+    vshDebug(ctl, VSH_ERR_INFO, "%s: found option <%s>: %s",
              cmd->def->name, optname, n);
 
     if (name)
diff --git a/tools/virsh-volume.c b/tools/virsh-volume.c
index 8805b8c06b..430961fef2 100644
--- a/tools/virsh-volume.c
+++ b/tools/virsh-volume.c
@@ -109,7 +109,7 @@ virshCommandOptVolBy(vshControl *ctl, const vshCmd *cmd,
         }
     }
 
-    vshDebug(ctl, VSH_ERR_DEBUG, "%s: found option <%s>: %s\n",
+    vshDebug(ctl, VSH_ERR_DEBUG, "%s: found option <%s>: %s",
              cmd->def->name, optname, n);
 
     if (name)
@@ -117,19 +117,19 @@ virshCommandOptVolBy(vshControl *ctl, const vshCmd *cmd,
 
     /* try it by name */
     if (pool && (flags & VIRSH_BYNAME)) {
-        vshDebug(ctl, VSH_ERR_DEBUG, "%s: <%s> trying as vol name\n",
+        vshDebug(ctl, VSH_ERR_DEBUG, "%s: <%s> trying as vol name",
                  cmd->def->name, optname);
         vol = virStorageVolLookupByName(pool, n);
     }
     /* try it by key */
     if (!vol && (flags & VIRSH_BYUUID)) {
-        vshDebug(ctl, VSH_ERR_DEBUG, "%s: <%s> trying as vol key\n",
+        vshDebug(ctl, VSH_ERR_DEBUG, "%s: <%s> trying as vol key",
                  cmd->def->name, optname);
         vol = virStorageVolLookupByKey(priv->conn, n);
     }
     /* try it by path */
     if (!vol && (flags & VIRSH_BYUUID)) {
-        vshDebug(ctl, VSH_ERR_DEBUG, "%s: <%s> trying as vol path\n",
+        vshDebug(ctl, VSH_ERR_DEBUG, "%s: <%s> trying as vol path",
                  cmd->def->name, optname);
         vol = virStorageVolLookupByPath(priv->conn, n);
     }
@@ -293,36 +293,36 @@ cmdVolCreateAs(vshControl *ctl, const vshCmd *cmd)
         /* Lookup snapshot backing volume.  Try the backing-vol
          *  parameter as a name */
         vshDebug(ctl, VSH_ERR_DEBUG,
-                 "%s: Look up backing store volume '%s' as name\n",
+                 "%s: Look up backing store volume '%s' as name",
                  cmd->def->name, snapshotStrVol);
         snapVol = virStorageVolLookupByName(pool, snapshotStrVol);
         if (snapVol)
                 vshDebug(ctl, VSH_ERR_DEBUG,
-                         "%s: Backing store volume found using '%s' as name\n",
+                         "%s: Backing store volume found using '%s' as name",
                          cmd->def->name, snapshotStrVol);
 
         if (snapVol == NULL) {
             /* Snapshot backing volume not found by name.  Try the
              *  backing-vol parameter as a key */
             vshDebug(ctl, VSH_ERR_DEBUG,
-                     "%s: Look up backing store volume '%s' as key\n",
+                     "%s: Look up backing store volume '%s' as key",
                      cmd->def->name, snapshotStrVol);
             snapVol = virStorageVolLookupByKey(priv->conn, snapshotStrVol);
             if (snapVol)
                 vshDebug(ctl, VSH_ERR_DEBUG,
-                         "%s: Backing store volume found using '%s' as key\n",
+                         "%s: Backing store volume found using '%s' as key",
                          cmd->def->name, snapshotStrVol);
         }
         if (snapVol == NULL) {
             /* Snapshot backing volume not found by key.  Try the
              *  backing-vol parameter as a path */
             vshDebug(ctl, VSH_ERR_DEBUG,
-                     "%s: Look up backing store volume '%s' as path\n",
+                     "%s: Look up backing store volume '%s' as path",
                      cmd->def->name, snapshotStrVol);
             snapVol = virStorageVolLookupByPath(priv->conn, snapshotStrVol);
             if (snapVol)
                 vshDebug(ctl, VSH_ERR_DEBUG,
-                         "%s: Backing store volume found using '%s' as path\n",
+                         "%s: Backing store volume found using '%s' as path",
                          cmd->def->name, snapshotStrVol);
         }
         if (snapVol == NULL) {
diff --git a/tools/virsh.c b/tools/virsh.c
index a958f2b82f..6abae3dae9 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c
@@ -165,7 +165,7 @@ virshConnect(vshControl *ctl, const char *uri, bool readonly)
             goto cleanup;
         }
         vshDebug(ctl, VSH_ERR_INFO, "%s",
-                 _("Failed to setup keepalive on connection\n"));
+                 _("Failed to setup keepalive on connection"));
         vshResetLibvirtError();
     }
 
@@ -769,7 +769,7 @@ virshParseArgv(vshControl *ctl, int argc, char **argv)
         /* parse command */
         ctl->imode = false;
         if (argc - optind == 1) {
-            vshDebug(ctl, VSH_ERR_INFO, "commands: \"%s\"\n", argv[optind]);
+            vshDebug(ctl, VSH_ERR_INFO, "commands: \"%s\"", argv[optind]);
             return vshCommandStringParse(ctl, argv[optind], NULL);
         } else {
             return vshCommandArgvParse(ctl, argc - optind, argv + optind);
diff --git a/tools/virt-admin.c b/tools/virt-admin.c
index 325b7aa827..16c9b2173a 100644
--- a/tools/virt-admin.c
+++ b/tools/virt-admin.c
@@ -1332,7 +1332,7 @@ vshAdmParseArgv(vshControl *ctl, int argc, char **argv)
         /* parse command */
         ctl->imode = false;
         if (argc - optind == 1) {
-            vshDebug(ctl, VSH_ERR_INFO, "commands: \"%s\"\n", argv[optind]);
+            vshDebug(ctl, VSH_ERR_INFO, "commands: \"%s\"", argv[optind]);
             return vshCommandStringParse(ctl, argv[optind], NULL);
         } else {
             return vshCommandArgvParse(ctl, argc - optind, argv + optind);
diff --git a/tools/vsh.c b/tools/vsh.c
index 812fc81bde..fb00cc40a6 100644
--- a/tools/vsh.c
+++ b/tools/vsh.c
@@ -542,7 +542,7 @@ vshCmdOptAssign(vshControl *ctl,
     case VSH_OT_BOOL:
         /* nothing to do */
         if (report) {
-            vshDebug(ctl, VSH_ERR_INFO, "%s: %s(bool)\n",
+            vshDebug(ctl, VSH_ERR_INFO, "%s: %s(bool)",
                      cmd->def->name, opt->def->name);
         }
         break;
@@ -550,7 +550,7 @@ vshCmdOptAssign(vshControl *ctl,
     case VSH_OT_STRING:
     case VSH_OT_INT:
         if (report) {
-            vshDebug(ctl, VSH_ERR_INFO, "%s: %s(optdata): %s\n",
+            vshDebug(ctl, VSH_ERR_INFO, "%s: %s(optdata): %s",
                      cmd->def->name, opt->def->name, NULLSTR(val));
         }
 
@@ -559,7 +559,7 @@ vshCmdOptAssign(vshControl *ctl,
 
     case VSH_OT_ARGV:
         if (report) {
-            vshDebug(ctl, VSH_ERR_INFO, "%s: %s(argv: %zu): %s\n",
+            vshDebug(ctl, VSH_ERR_INFO, "%s: %s(argv: %zu): %s",
                      cmd->def->name, opt->def->name, opt->nargv, NULLSTR(val));
         }
 
@@ -1973,7 +1973,7 @@ vshDebug(vshControl *ctl, int level, const char *format, ...)
 
     vshOutputLogFile(ctl, level, str);
 
-    fputs(str, stdout);
+    fprintf(stderr, "%s\n", str);
     fflush(stdout);
 }
 
-- 
2.48.1




[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]

  Powered by Linux