[libvirt] [PATCH] Remove superfluous new lines from messages

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

 



I noticed some debug messages are printed with an empty lines after
them. This patch removes these empty lines from all invocations of the
following macros:
    VIR_DEBUG
    VIR_DEBUG0
    VIR_ERROR
    VIR_ERROR0
    VIR_INFO
    VIR_WARN
    VIR_WARN0

Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
---
 daemon/libvirtd.c                         |   10 +++---
 daemon/remote.c                           |    8 ++--
 src/lxc/lxc_driver.c                      |    2 +-
 src/network/bridge_driver.c               |   10 +++---
 src/node_device/node_device_hal.c         |   16 ++++----
 src/node_device/node_device_linux_sysfs.c |   16 ++++----
 src/node_device/node_device_udev.c        |   54 ++++++++++++++--------------
 src/qemu/qemu_driver.c                    |   36 +++++++++---------
 src/qemu/qemu_monitor_text.c              |   14 ++++----
 src/secret/secret_driver.c                |    2 +-
 src/util/pci.c                            |    2 +-
 src/xen/proxy_internal.c                  |   22 ++++++------
 tools/console.c                           |   12 +++---
 13 files changed, 102 insertions(+), 102 deletions(-)

diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c
index c53ef0a..551c69c 100644
--- a/daemon/libvirtd.c
+++ b/daemon/libvirtd.c
@@ -600,7 +600,7 @@ remoteMakeSockets (int *fds, int max_fds, int *nfds_r, const char *node, const c
 
     int e = getaddrinfo (node, service, &hints, &ai);
     if (e != 0) {
-        VIR_ERROR(_("getaddrinfo: %s\n"), gai_strerror (e));
+        VIR_ERROR(_("getaddrinfo: %s"), gai_strerror (e));
         return -1;
     }
 
@@ -2511,7 +2511,7 @@ checkType (virConfValuePtr p, const char *filename,
             (var_name) = strdup (p->str);                               \
             if ((var_name) == NULL) {                                   \
                 char ebuf[1024];                                        \
-                VIR_ERROR(_("remoteReadConfigFile: %s\n"),		\
+                VIR_ERROR(_("remoteReadConfigFile: %s"),		\
                           virStrerror(errno, ebuf, sizeof ebuf));       \
                 goto free_and_fail;                                     \
             }                                                           \
@@ -2554,7 +2554,7 @@ static int remoteConfigGetAuth(virConfPtr conf, const char *key, int *auth, cons
         *auth = REMOTE_AUTH_POLKIT;
 #endif
     } else {
-        VIR_ERROR(_("remoteReadConfigFile: %s: %s: unsupported auth %s\n"),
+        VIR_ERROR(_("remoteReadConfigFile: %s: %s: unsupported auth %s"),
                   filename, key, p->str);
         return -1;
     }
@@ -2839,13 +2839,13 @@ qemudSetupPrivs (void)
 
     if (__init_daemon_priv (PU_RESETGROUPS | PU_CLEARLIMITSET,
         SYSTEM_UID, SYSTEM_UID, PRIV_XVM_CONTROL, NULL)) {
-        VIR_ERROR0(_("additional privileges are required\n"));
+        VIR_ERROR0(_("additional privileges are required"));
         return -1;
     }
 
     if (priv_set (PRIV_OFF, PRIV_ALLSETS, PRIV_FILE_LINK_ANY, PRIV_PROC_INFO,
         PRIV_PROC_SESSION, PRIV_PROC_EXEC, PRIV_PROC_FORK, NULL)) {
-        VIR_ERROR0(_("failed to set reduced privileges\n"));
+        VIR_ERROR0(_("failed to set reduced privileges"));
         return -1;
     }
 
diff --git a/daemon/remote.c b/daemon/remote.c
index 0b30131..8f8adba 100644
--- a/daemon/remote.c
+++ b/daemon/remote.c
@@ -3375,7 +3375,7 @@ remoteDispatchAuthPolkit (struct qemud_server *server,
         goto authfail;
     }
     if (status != 0) {
-        VIR_ERROR(_("Policy kit denied action %s from pid %d, uid %d, result: %d\n"),
+        VIR_ERROR(_("Policy kit denied action %s from pid %d, uid %d, result: %d"),
                   action, callerPid, callerUid, status);
         goto authfail;
     }
@@ -3442,7 +3442,7 @@ remoteDispatchAuthPolkit (struct qemud_server *server,
 
     if (!(pkaction = polkit_action_new())) {
         char ebuf[1024];
-        VIR_ERROR(_("Failed to create polkit action %s\n"),
+        VIR_ERROR(_("Failed to create polkit action %s"),
                   virStrerror(errno, ebuf, sizeof ebuf));
         polkit_caller_unref(pkcaller);
         goto authfail;
@@ -3452,7 +3452,7 @@ remoteDispatchAuthPolkit (struct qemud_server *server,
     if (!(pkcontext = polkit_context_new()) ||
         !polkit_context_init(pkcontext, &pkerr)) {
         char ebuf[1024];
-        VIR_ERROR(_("Failed to create polkit context %s\n"),
+        VIR_ERROR(_("Failed to create polkit context %s"),
                   (pkerr ? polkit_error_get_error_message(pkerr)
                    : virStrerror(errno, ebuf, sizeof ebuf)));
         if (pkerr)
@@ -3484,7 +3484,7 @@ remoteDispatchAuthPolkit (struct qemud_server *server,
     polkit_caller_unref(pkcaller);
     polkit_action_unref(pkaction);
     if (pkresult != POLKIT_RESULT_YES) {
-        VIR_ERROR(_("Policy kit denied action %s from pid %d, uid %d, result: %s\n"),
+        VIR_ERROR(_("Policy kit denied action %s from pid %d, uid %d, result: %s"),
                   action, callerPid, callerUid,
                   polkit_result_to_string_representation(pkresult));
         goto authfail;
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index 86606c7..556359e 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -1603,7 +1603,7 @@ lxcAutostartDomain(void *payload, const char *name ATTRIBUTE_UNUSED, void *opaqu
         int ret = lxcVmStart(data->conn, data->driver, vm);
         if (ret < 0) {
             virErrorPtr err = virGetLastError();
-            VIR_ERROR(_("Failed to autostart VM '%s': %s\n"),
+            VIR_ERROR(_("Failed to autostart VM '%s': %s"),
                       vm->def->name,
                       err ? err->message : "");
         } else {
diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index 69809b3..4385215 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -977,14 +977,14 @@ static int networkStartNetworkDaemon(virConnectPtr conn,
  err_delbr1:
     if ((err = brSetInterfaceUp(driver->brctl, network->def->bridge, 0))) {
         char ebuf[1024];
-        VIR_WARN(_("Failed to bring down bridge '%s' : %s\n"),
+        VIR_WARN(_("Failed to bring down bridge '%s' : %s"),
                  network->def->bridge, virStrerror(err, ebuf, sizeof ebuf));
     }
 
  err_delbr:
     if ((err = brDeleteBridge(driver->brctl, network->def->bridge))) {
         char ebuf[1024];
-        VIR_WARN(_("Failed to delete bridge '%s' : %s\n"),
+        VIR_WARN(_("Failed to delete bridge '%s' : %s"),
                  network->def->bridge, virStrerror(err, ebuf, sizeof ebuf));
     }
 
@@ -998,7 +998,7 @@ static int networkShutdownNetworkDaemon(virConnectPtr conn,
     int err;
     char *stateFile;
 
-    VIR_INFO(_("Shutting down network '%s'\n"), network->def->name);
+    VIR_INFO(_("Shutting down network '%s'"), network->def->name);
 
     if (!virNetworkObjIsActive(network))
         return 0;
@@ -1017,12 +1017,12 @@ static int networkShutdownNetworkDaemon(virConnectPtr conn,
 
     char ebuf[1024];
     if ((err = brSetInterfaceUp(driver->brctl, network->def->bridge, 0))) {
-        VIR_WARN(_("Failed to bring down bridge '%s' : %s\n"),
+        VIR_WARN(_("Failed to bring down bridge '%s' : %s"),
                  network->def->bridge, virStrerror(err, ebuf, sizeof ebuf));
     }
 
     if ((err = brDeleteBridge(driver->brctl, network->def->bridge))) {
-        VIR_WARN(_("Failed to delete bridge '%s' : %s\n"),
+        VIR_WARN(_("Failed to delete bridge '%s' : %s"),
                  network->def->bridge, virStrerror(err, ebuf, sizeof ebuf));
     }
 
diff --git a/src/node_device/node_device_hal.c b/src/node_device/node_device_hal.c
index 7cb931e..02fcbf6 100644
--- a/src/node_device/node_device_hal.c
+++ b/src/node_device/node_device_hal.c
@@ -720,22 +720,22 @@ static int halDeviceMonitorStartup(int privileged ATTRIBUTE_UNUSED)
     dbus_error_init(&err);
     hal_ctx = libhal_ctx_new();
     if (hal_ctx == NULL) {
-        VIR_ERROR0("libhal_ctx_new returned NULL\n");
+        VIR_ERROR0("libhal_ctx_new returned NULL");
         goto failure;
     }
     dbus_conn = dbus_bus_get(DBUS_BUS_SYSTEM, &err);
     if (dbus_conn == NULL) {
-        VIR_ERROR0("dbus_bus_get failed\n");
+        VIR_ERROR0("dbus_bus_get failed");
         goto failure;
     }
     dbus_connection_set_exit_on_disconnect(dbus_conn, FALSE);
 
     if (!libhal_ctx_set_dbus_connection(hal_ctx, dbus_conn)) {
-        VIR_ERROR0("libhal_ctx_set_dbus_connection failed\n");
+        VIR_ERROR0("libhal_ctx_set_dbus_connection failed");
         goto failure;
     }
     if (!libhal_ctx_init(hal_ctx, &err)) {
-        VIR_ERROR0("libhal_ctx_init failed, haldaemon is probably not running\n");
+        VIR_ERROR0("libhal_ctx_init failed, haldaemon is probably not running");
         /* We don't want to show a fatal error here,
            otherwise entire libvirtd shuts down when
            hald isn't running */
@@ -749,7 +749,7 @@ static int halDeviceMonitorStartup(int privileged ATTRIBUTE_UNUSED)
                                              remove_dbus_watch,
                                              toggle_dbus_watch,
                                              NULL, NULL)) {
-        VIR_ERROR0("dbus_connection_set_watch_functions failed\n");
+        VIR_ERROR0("dbus_connection_set_watch_functions failed");
         goto failure;
     }
 
@@ -770,13 +770,13 @@ static int halDeviceMonitorStartup(int privileged ATTRIBUTE_UNUSED)
         !libhal_ctx_set_device_lost_capability(hal_ctx, device_cap_lost) ||
         !libhal_ctx_set_device_property_modified(hal_ctx, device_prop_modified) ||
         !libhal_device_property_watch_all(hal_ctx, &err)) {
-        VIR_ERROR0("setting up HAL callbacks failed\n");
+        VIR_ERROR0("setting up HAL callbacks failed");
         goto failure;
     }
 
     udi = libhal_get_all_devices(hal_ctx, &num_devs, &err);
     if (udi == NULL) {
-        VIR_ERROR0("libhal_get_all_devices failed\n");
+        VIR_ERROR0("libhal_get_all_devices failed");
         goto failure;
     }
     for (i = 0; i < num_devs; i++) {
@@ -789,7 +789,7 @@ static int halDeviceMonitorStartup(int privileged ATTRIBUTE_UNUSED)
 
  failure:
     if (dbus_error_is_set(&err)) {
-        VIR_ERROR("%s: %s\n", err.name, err.message);
+        VIR_ERROR("%s: %s", err.name, err.message);
         dbus_error_free(&err);
     }
     virNodeDeviceObjListFree(&driverState->devs);
diff --git a/src/node_device/node_device_linux_sysfs.c b/src/node_device/node_device_linux_sysfs.c
index b1dff10..ff7aaf0 100644
--- a/src/node_device/node_device_linux_sysfs.c
+++ b/src/node_device/node_device_linux_sysfs.c
@@ -245,12 +245,12 @@ static int get_sriov_function(const char *device_link,
     char errbuf[64];
     int ret = SRIOV_ERROR;
 
-    VIR_DEBUG("Attempting to resolve device path from device link '%s'\n",
+    VIR_DEBUG("Attempting to resolve device path from device link '%s'",
               device_link);
 
     if (!virFileExists(device_link)) {
 
-        VIR_DEBUG("SR IOV function link '%s' does not exist\n", device_link);
+        VIR_DEBUG("SR IOV function link '%s' does not exist", device_link);
         /* Not an SR IOV device, not an error, either. */
         ret = SRIOV_NOT_FOUND;
 
@@ -261,24 +261,24 @@ static int get_sriov_function(const char *device_link,
     device_path = realpath(device_link, device_path);
     if (device_path == NULL) {
         memset(errbuf, '\0', sizeof(errbuf));
-        VIR_ERROR("Failed to resolve device link '%s': '%s'\n", device_link,
+        VIR_ERROR("Failed to resolve device link '%s': '%s'", device_link,
                   virStrerror(errno, errbuf, sizeof(errbuf)));
         goto out;
     }
 
-    VIR_DEBUG("SR IOV device path is '%s'\n", device_path);
+    VIR_DEBUG("SR IOV device path is '%s'", device_path);
     config_address = basename(device_path);
     if (VIR_ALLOC(*bdf) != 0) {
-        VIR_ERROR0("Failed to allocate memory for PCI device name\n");
+        VIR_ERROR0("Failed to allocate memory for PCI device name");
         goto out;
     }
 
     if (parse_pci_config_address(config_address, *bdf) != 0) {
-        VIR_ERROR("Failed to parse PCI config address '%s'\n", config_address);
+        VIR_ERROR("Failed to parse PCI config address '%s'", config_address);
         goto out;
     }
 
-    VIR_DEBUG("SR IOV function %.4x:%.2x:%.2x.%.1x/>\n",
+    VIR_DEBUG("SR IOV function %.4x:%.2x:%.2x.%.1x",
               (*bdf)->domain,
               (*bdf)->bus,
               (*bdf)->slot,
@@ -341,7 +341,7 @@ int get_virtual_functions_linux(const char *sysfs_path,
                 goto out;
             }
 
-            VIR_DEBUG("Number of virtual functions: %d\n", *num_funcs);
+            VIR_DEBUG("Number of virtual functions: %d", *num_funcs);
             if (VIR_REALLOC_N(d->pci_dev.virtual_functions,
                               (*num_funcs) + 1) != 0) {
                 virReportOOMError(NULL);
diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c
index 7a9c1e5..d0ba88e 100644
--- a/src/node_device/node_device_udev.c
+++ b/src/node_device/node_device_udev.c
@@ -52,9 +52,9 @@ static int udevStrToLong_ull(char const *s,
 
     ret = virStrToLong_ull(s, end_ptr, base, result);
     if (ret != 0) {
-        VIR_ERROR("Failed to convert '%s' to unsigned long long\n", s);
+        VIR_ERROR("Failed to convert '%s' to unsigned long long", s);
     } else {
-        VIR_DEBUG("Converted '%s' to unsigned long %llu\n", s, *result);
+        VIR_DEBUG("Converted '%s' to unsigned long %llu", s, *result);
     }
 
     return ret;
@@ -70,9 +70,9 @@ static int udevStrToLong_ui(char const *s,
 
     ret = virStrToLong_ui(s, end_ptr, base, result);
     if (ret != 0) {
-        VIR_ERROR("Failed to convert '%s' to unsigned int\n", s);
+        VIR_ERROR("Failed to convert '%s' to unsigned int", s);
     } else {
-        VIR_DEBUG("Converted '%s' to unsigned int %u\n", s, *result);
+        VIR_DEBUG("Converted '%s' to unsigned int %u", s, *result);
     }
 
     return ret;
@@ -87,9 +87,9 @@ static int udevStrToLong_i(char const *s,
 
     ret = virStrToLong_i(s, end_ptr, base, result);
     if (ret != 0) {
-        VIR_ERROR("Failed to convert '%s' to int\n", s);
+        VIR_ERROR("Failed to convert '%s' to int", s);
     } else {
-        VIR_DEBUG("Converted '%s' to int %u\n", s, *result);
+        VIR_DEBUG("Converted '%s' to int %u", s, *result);
     }
 
     return ret;
@@ -363,7 +363,7 @@ static int udevTranslatePCIIds(unsigned int vendor,
     const char *vendor_name = NULL, *device_name = NULL;
 
     if (pci_system_init() != 0) {
-        VIR_ERROR0("Failed to initialize libpciaccess\n");
+        VIR_ERROR0("Failed to initialize libpciaccess");
         goto out;
     }
 
@@ -734,7 +734,7 @@ static int udevGetSCSIType(unsigned int type, char **typestring)
             ret = -1;
             virReportOOMError(NULL);
         } else {
-            VIR_ERROR("Failed to find SCSI device type %d\n", type);
+            VIR_ERROR("Failed to find SCSI device type %d", type);
         }
     }
 
@@ -799,7 +799,7 @@ static int udevProcessSCSIDevice(struct udev_device *device ATTRIBUTE_UNUSED,
 
 out:
     if (ret != 0) {
-        VIR_ERROR("Failed to process SCSI device with sysfs path '%s'\n",
+        VIR_ERROR("Failed to process SCSI device with sysfs path '%s'",
                   def->sysfs_path);
     }
     return ret;
@@ -957,7 +957,7 @@ static int udevProcessStorage(struct udev_device *device,
 
     devnode = udev_device_get_devnode(device);
     if(!devnode) {
-        VIR_DEBUG("No devnode for '%s'\n", udev_device_get_devpath(device));
+        VIR_DEBUG("No devnode for '%s'", udev_device_get_devpath(device));
         goto out;
     }
     data->storage.block = strdup(devnode);
@@ -1007,7 +1007,7 @@ static int udevProcessStorage(struct udev_device *device,
     } else if (STREQ(def->caps->data.storage.drive_type, "disk")) {
         ret = udevProcessDisk(device, def);
     } else {
-        VIR_INFO("Unsupported storage type '%s'\n",
+        VIR_INFO("Unsupported storage type '%s'",
                  def->caps->data.storage.drive_type);
         goto out;
     }
@@ -1121,7 +1121,7 @@ static int udevGetDeviceDetails(struct udev_device *device,
         ret = udevProcessStorage(device, def);
         break;
     default:
-        VIR_ERROR("Unknown device type %d\n", def->caps->type);
+        VIR_ERROR("Unknown device type %d", def->caps->type);
         ret = -1;
         break;
     }
@@ -1139,11 +1139,11 @@ static int udevRemoveOneDevice(struct udev_device *device)
     name = udev_device_get_syspath(device);
     dev = virNodeDeviceFindBySysfsPath(&driverState->devs, name);
     if (dev != NULL) {
-        VIR_DEBUG("Removing device '%s' with sysfs path '%s'\n",
+        VIR_DEBUG("Removing device '%s' with sysfs path '%s'",
                   dev->def->name, name);
         virNodeDeviceObjRemove(&driverState->devs, dev);
     } else {
-        VIR_INFO("Failed to find device to remove that has udev name '%s'\n",
+        VIR_INFO("Failed to find device to remove that has udev name '%s'",
                  name);
         ret = -1;
     }
@@ -1162,14 +1162,14 @@ static int udevSetParent(struct udev_device *device,
 
     parent_device = udev_device_get_parent(device);
     if (parent_device == NULL) {
-        VIR_INFO("Could not find udev parent for device with sysfs path '%s'\n",
+        VIR_INFO("Could not find udev parent for device with sysfs path '%s'",
                  udev_device_get_syspath(device));
         goto out;
     }
 
     parent_sysfs_path = udev_device_get_syspath(parent_device);
     if (parent_sysfs_path == NULL) {
-        VIR_INFO("Could not get syspath for parent of '%s'\n",
+        VIR_INFO("Could not get syspath for parent of '%s'",
                  udev_device_get_syspath(device));
         goto out;
     }
@@ -1237,7 +1237,7 @@ static int udevAddOneDevice(struct udev_device *device)
 
     dev = virNodeDeviceAssignDef(NULL, &driverState->devs, def);
     if (dev == NULL) {
-        VIR_ERROR("Failed to create device for '%s'\n", def->name);
+        VIR_ERROR("Failed to create device for '%s'", def->name);
         virNodeDeviceDefFree(def);
         goto out;
     }
@@ -1263,7 +1263,7 @@ static int udevProcessDeviceListEntry(struct udev *udev,
     device = udev_device_new_from_syspath(udev, name);
     if (device != NULL) {
         if (udevAddOneDevice(device) != 0) {
-            VIR_INFO("Failed to create node device for udev device '%s'\n",
+            VIR_INFO("Failed to create node device for udev device '%s'",
                      name);
         }
         udev_device_unref(device);
@@ -1285,7 +1285,7 @@ static int udevEnumerateDevices(struct udev *udev)
 
     ret = udev_enumerate_scan_devices(udev_enumerate);
     if (0 != ret) {
-        VIR_ERROR("udev scan devices returned %d\n", ret);
+        VIR_ERROR("udev scan devices returned %d", ret);
         goto out;
     }
 
@@ -1355,12 +1355,12 @@ static void udevEventHandleCallback(int watch ATTRIBUTE_UNUSED,
 
     device = udev_monitor_receive_device(udev_monitor);
     if (device == NULL) {
-        VIR_ERROR0("udev_monitor_receive_device returned NULL\n");
+        VIR_ERROR0("udev_monitor_receive_device returned NULL");
         goto out;
     }
 
     action = udev_device_get_action(device);
-    VIR_DEBUG("udev action: '%s'\n", action);
+    VIR_DEBUG("udev action: '%s'", action);
 
     if (STREQ(action, "add") || STREQ(action, "change")) {
         udevAddOneDevice(device);
@@ -1406,11 +1406,11 @@ static int udevSetupSystemDev(void)
     udev = udev_monitor_get_udev(DRV_STATE_UDEV_MONITOR(driverState));
     device = udev_device_new_from_syspath(udev, DMI_DEVPATH);
     if (device == NULL) {
-        VIR_ERROR("Failed to get udev device for syspath '%s'\n", DMI_DEVPATH);
+        VIR_ERROR("Failed to get udev device for syspath '%s'", DMI_DEVPATH);
 
         device = udev_device_new_from_syspath(udev, DMI_DEVPATH_FALLBACK);
         if (device == NULL) {
-            VIR_ERROR("Failed to get udev device for syspath '%s'\n", DMI_DEVPATH_FALLBACK);
+            VIR_ERROR("Failed to get udev device for syspath '%s'", DMI_DEVPATH_FALLBACK);
             goto out;
         }
     }
@@ -1472,7 +1472,7 @@ static int udevSetupSystemDev(void)
 
     dev = virNodeDeviceAssignDef(NULL, &driverState->devs, def);
     if (dev == NULL) {
-        VIR_ERROR("Failed to create device for '%s'\n", def->name);
+        VIR_ERROR("Failed to create device for '%s'", def->name);
         virNodeDeviceDefFree(def);
         goto out;
     }
@@ -1498,7 +1498,7 @@ static int udevDeviceMonitorStartup(int privileged ATTRIBUTE_UNUSED)
     }
 
     if (virMutexInit(&driverState->lock) < 0) {
-        VIR_ERROR0("Failed to initialize mutex for driverState\n");
+        VIR_ERROR0("Failed to initialize mutex for driverState");
         VIR_FREE(driverState);
         ret = -1;
         goto out;
@@ -1517,7 +1517,7 @@ static int udevDeviceMonitorStartup(int privileged ATTRIBUTE_UNUSED)
 
     udev_monitor = udev_monitor_new_from_netlink(udev, "udev");
     if (udev_monitor == NULL) {
-        VIR_ERROR0("udev_monitor_new_from_netlink returned NULL\n");
+        VIR_ERROR0("udev_monitor_new_from_netlink returned NULL");
         ret = -1;
         goto out;
     }
@@ -1612,7 +1612,7 @@ static virStateDriver udevStateDriver = {
 
 int udevNodeRegister(void)
 {
-    VIR_DEBUG0("Registering udev node device backend\n");
+    VIR_DEBUG0("Registering udev node device backend");
 
     registerCommonNodeFuncs(&udevDeviceMonitor);
     if (virRegisterDeviceMonitor(&udevDeviceMonitor) < 0) {
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 8817565..c7732f7 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -579,7 +579,7 @@ qemuAutostartDomain(void *payload, const char *name ATTRIBUTE_UNUSED, void *opaq
         ret = qemudStartVMDaemon(data->conn, data->driver, vm, NULL, -1);
         if (ret < 0) {
             virErrorPtr err = virGetLastError();
-            VIR_ERROR(_("Failed to autostart VM '%s': %s\n"),
+            VIR_ERROR(_("Failed to autostart VM '%s': %s"),
                       vm->def->name,
                       err ? err->message : "");
         } else {
@@ -819,7 +819,7 @@ qemuConnectMonitor(virDomainObjPtr vm)
                                      priv->monConfig,
                                      priv->monJSON,
                                      &monitorCallbacks)) == NULL) {
-        VIR_ERROR(_("Failed to connect monitor for %s\n"), vm->def->name);
+        VIR_ERROR(_("Failed to connect monitor for %s"), vm->def->name);
         return -1;
     }
 
@@ -1028,19 +1028,19 @@ qemudStartup(int privileged) {
 
     if (virFileMakePath(qemu_driver->stateDir) < 0) {
         char ebuf[1024];
-        VIR_ERROR(_("Failed to create state dir '%s': %s\n"),
+        VIR_ERROR(_("Failed to create state dir '%s': %s"),
                   qemu_driver->stateDir, virStrerror(errno, ebuf, sizeof ebuf));
         goto error;
     }
     if (virFileMakePath(qemu_driver->libDir) < 0) {
         char ebuf[1024];
-        VIR_ERROR(_("Failed to create lib dir '%s': %s\n"),
+        VIR_ERROR(_("Failed to create lib dir '%s': %s"),
                   qemu_driver->libDir, virStrerror(errno, ebuf, sizeof ebuf));
         goto error;
     }
     if (virFileMakePath(qemu_driver->cacheDir) < 0) {
         char ebuf[1024];
-        VIR_ERROR(_("Failed to create cache dir '%s': %s\n"),
+        VIR_ERROR(_("Failed to create cache dir '%s': %s"),
                   qemu_driver->cacheDir, virStrerror(errno, ebuf, sizeof ebuf));
         goto error;
     }
@@ -1520,7 +1520,7 @@ qemudWaitForMonitor(virConnectPtr conn,
                              "console", 3);
     if (close(logfd) < 0) {
         char ebuf[4096];
-        VIR_WARN(_("Unable to close logfile: %s\n"),
+        VIR_WARN(_("Unable to close logfile: %s"),
                  virStrerror(errno, ebuf, sizeof ebuf));
     }
 
@@ -1865,7 +1865,7 @@ qemuDomainReAttachHostDevices(virConnectPtr conn,
 
     if (!(pcidevs = qemuGetPciHostDeviceList(conn, def))) {
         virErrorPtr err = virGetLastError();
-        VIR_ERROR(_("Failed to allocate pciDeviceList: %s\n"),
+        VIR_ERROR(_("Failed to allocate pciDeviceList: %s"),
                   err ? err->message : "");
         virResetError(err);
         return;
@@ -1884,7 +1884,7 @@ qemuDomainReAttachHostDevices(virConnectPtr conn,
         if (pciResetDevice(conn, dev,
                            driver->activePciHostdevs) < 0) {
             virErrorPtr err = virGetLastError();
-            VIR_ERROR(_("Failed to reset PCI device: %s\n"),
+            VIR_ERROR(_("Failed to reset PCI device: %s"),
                       err ? err->message : "");
             virResetError(err);
         }
@@ -1895,7 +1895,7 @@ qemuDomainReAttachHostDevices(virConnectPtr conn,
         if (pciDeviceGetManaged(dev) &&
             pciReAttachDevice(NULL, dev) < 0) {
             virErrorPtr err = virGetLastError();
-            VIR_ERROR(_("Failed to re-attach PCI device: %s\n"),
+            VIR_ERROR(_("Failed to re-attach PCI device: %s"),
                       err ? err->message : "");
             virResetError(err);
         }
@@ -2475,29 +2475,29 @@ static int qemudStartVMDaemon(virConnectPtr conn,
     tmp = progenv;
     while (*tmp) {
         if (safewrite(logfile, *tmp, strlen(*tmp)) < 0)
-            VIR_WARN(_("Unable to write envv to logfile: %s\n"),
+            VIR_WARN(_("Unable to write envv to logfile: %s"),
                      virStrerror(errno, ebuf, sizeof ebuf));
         if (safewrite(logfile, " ", 1) < 0)
-            VIR_WARN(_("Unable to write envv to logfile: %s\n"),
+            VIR_WARN(_("Unable to write envv to logfile: %s"),
                      virStrerror(errno, ebuf, sizeof ebuf));
         tmp++;
     }
     tmp = argv;
     while (*tmp) {
         if (safewrite(logfile, *tmp, strlen(*tmp)) < 0)
-            VIR_WARN(_("Unable to write argv to logfile: %s\n"),
+            VIR_WARN(_("Unable to write argv to logfile: %s"),
                      virStrerror(errno, ebuf, sizeof ebuf));
         if (safewrite(logfile, " ", 1) < 0)
-            VIR_WARN(_("Unable to write argv to logfile: %s\n"),
+            VIR_WARN(_("Unable to write argv to logfile: %s"),
                      virStrerror(errno, ebuf, sizeof ebuf));
         tmp++;
     }
     if (safewrite(logfile, "\n", 1) < 0)
-        VIR_WARN(_("Unable to write argv to logfile: %s\n"),
+        VIR_WARN(_("Unable to write argv to logfile: %s"),
                  virStrerror(errno, ebuf, sizeof ebuf));
 
     if ((pos = lseek(logfile, 0, SEEK_END)) < 0)
-        VIR_WARN(_("Unable to seek to end of logfile: %s\n"),
+        VIR_WARN(_("Unable to seek to end of logfile: %s"),
                  virStrerror(errno, ebuf, sizeof ebuf));
 
     for (i = 0 ; i < ntapfds ; i++)
@@ -5256,7 +5256,7 @@ cleanup:
 
 try_remove:
     if (!net->hostnet_name || net->vlan == 0)
-        VIR_WARN0(_("Unable to remove network backend\n"));
+        VIR_WARN0(_("Unable to remove network backend"));
     else {
         qemuDomainObjEnterMonitorWithDriver(driver, vm);
         if (qemuMonitorRemoveHostNetwork(priv->mon, net->vlan, net->hostnet_name) < 0)
@@ -5270,7 +5270,7 @@ try_tapfd_close:
     if (tapfd_name) {
         qemuDomainObjEnterMonitorWithDriver(driver, vm);
         if (qemuMonitorCloseFileHandle(priv->mon, tapfd_name) < 0)
-            VIR_WARN(_("Failed to close tapfd with '%s'\n"), tapfd_name);
+            VIR_WARN(_("Failed to close tapfd with '%s'"), tapfd_name);
         qemuDomainObjExitMonitorWithDriver(driver, vm);
     }
 
@@ -7639,7 +7639,7 @@ endjob:
              * overwrite the previous error, though, so we just throw something
              * to the logs and hope for the best
              */
-            VIR_ERROR(_("Failed to resume guest %s after failure\n"),
+            VIR_ERROR(_("Failed to resume guest %s after failure"),
                       vm->def->name);
         }
         qemuDomainObjExitMonitorWithDriver(driver, vm);
diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c
index 5b9ced2..aae026e 100644
--- a/src/qemu/qemu_monitor_text.c
+++ b/src/qemu/qemu_monitor_text.c
@@ -1301,42 +1301,42 @@ qemuMonitorTextParsePciAddReply(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
         s += strlen("domain ");
 
         if (virStrToLong_ui(s, &e, 10, domain) == -1) {
-            VIR_WARN(_("Unable to parse domain number '%s'\n"), s);
+            VIR_WARN(_("Unable to parse domain number '%s'"), s);
             return -1;
         }
 
         if (!STRPREFIX(e, ", ")) {
-            VIR_WARN(_("Expected ', ' parsing pci_add reply '%s'\n"), s);
+            VIR_WARN(_("Expected ', ' parsing pci_add reply '%s'"), s);
             return -1;
         }
         s = e + 2;
     }
 
     if (!STRPREFIX(s, "bus ")) {
-        VIR_WARN(_("Expected 'bus ' parsing pci_add reply '%s'\n"), s);
+        VIR_WARN(_("Expected 'bus ' parsing pci_add reply '%s'"), s);
         return -1;
     }
     s += strlen("bus ");
 
     if (virStrToLong_ui(s, &e, 10, bus) == -1) {
-        VIR_WARN(_("Unable to parse bus number '%s'\n"), s);
+        VIR_WARN(_("Unable to parse bus number '%s'"), s);
         return -1;
     }
 
     if (!STRPREFIX(e, ", ")) {
-        VIR_WARN(_("Expected ', ' parsing pci_add reply '%s'\n"), s);
+        VIR_WARN(_("Expected ', ' parsing pci_add reply '%s'"), s);
         return -1;
     }
     s = e + 2;
 
     if (!STRPREFIX(s, "slot ")) {
-        VIR_WARN(_("Expected 'slot ' parsing pci_add reply '%s'\n"), s);
+        VIR_WARN(_("Expected 'slot ' parsing pci_add reply '%s'"), s);
         return -1;
     }
     s += strlen("slot ");
 
     if (virStrToLong_ui(s, &e, 10, slot) == -1) {
-        VIR_WARN(_("Unable to parse slot number '%s'\n"), s);
+        VIR_WARN(_("Unable to parse slot number '%s'"), s);
         return -1;
     }
 
diff --git a/src/secret/secret_driver.c b/src/secret/secret_driver.c
index 1eef468..4478296 100644
--- a/src/secret/secret_driver.c
+++ b/src/secret/secret_driver.c
@@ -498,7 +498,7 @@ loadSecrets(virConnectPtr conn, virSecretDriverStatePtr driver,
         if (secret == NULL) {
             virErrorPtr err = virGetLastError();
 
-            VIR_ERROR(_("Error reading secret: %s\n"),
+            VIR_ERROR(_("Error reading secret: %s"),
                       err != NULL ? err->message: "");
             virResetError(err);
             continue;
diff --git a/src/util/pci.c b/src/util/pci.c
index 1e003c2..109d435 100644
--- a/src/util/pci.c
+++ b/src/util/pci.c
@@ -440,7 +440,7 @@ pciIsParent(pciDevice *dev, pciDevice *check, void *data ATTRIBUTE_UNUSED)
     secondary   = pciRead8(check, PCI_SECONDARY_BUS);
     subordinate = pciRead8(check, PCI_SUBORDINATE_BUS);
 
-    VIR_DEBUG("%s %s: found parent device %s\n", dev->id, dev->name, check->name);
+    VIR_DEBUG("%s %s: found parent device %s", dev->id, dev->name, check->name);
 
     /* No, it's superman! */
     return (dev->bus >= secondary && dev->bus <= subordinate);
diff --git a/src/xen/proxy_internal.c b/src/xen/proxy_internal.c
index 73a0469..bde3eda 100644
--- a/src/xen/proxy_internal.c
+++ b/src/xen/proxy_internal.c
@@ -146,11 +146,11 @@ virProxyForkServer(void)
     const char *proxyarg[2];
 
     if (!proxyPath) {
-        VIR_WARN0("failed to find libvirt_proxy\n");
+        VIR_WARN0("failed to find libvirt_proxy");
         return(-1);
     }
 
-    VIR_DEBUG("Asking to launch %s\n", proxyPath);
+    VIR_DEBUG("Asking to launch %s", proxyPath);
 
     proxyarg[0] = proxyPath;
     proxyarg[1] = NULL;
@@ -158,7 +158,7 @@ virProxyForkServer(void)
     if (virExecDaemonize(NULL, proxyarg, NULL, NULL,
                          &pid, -1, NULL, NULL, 0,
                          NULL, NULL, NULL) < 0)
-        VIR_ERROR0("Failed to fork libvirt_proxy\n");
+        VIR_ERROR0("Failed to fork libvirt_proxy");
 
     return (0);
 }
@@ -239,9 +239,9 @@ virProxyCloseSocket(xenUnifiedPrivatePtr priv) {
 
     ret = close(priv->proxy);
     if (ret != 0)
-        VIR_WARN(_("Failed to close socket %d\n"), priv->proxy);
+        VIR_WARN(_("Failed to close socket %d"), priv->proxy);
     else
-        VIR_DEBUG("Closed socket %d\n", priv->proxy);
+        VIR_DEBUG("Closed socket %d", priv->proxy);
     priv->proxy = -1;
     return(ret);
 }
@@ -267,14 +267,14 @@ retry:
     ret = read(fd, buffer, len);
     if (ret < 0) {
         if (errno == EINTR) {
-            VIR_DEBUG("read socket %d interrupted\n", fd);
+            VIR_DEBUG("read socket %d interrupted", fd);
             goto retry;
         }
-        VIR_WARN("Failed to read socket %d\n", fd);
+        VIR_WARN("Failed to read socket %d", fd);
         return(-1);
     }
 
-    VIR_DEBUG("read %d bytes from socket %d\n",
+    VIR_DEBUG("read %d bytes from socket %d",
               ret, fd);
     return(ret);
 }
@@ -296,10 +296,10 @@ virProxyWriteClientSocket(int fd, const char *data, int len) {
 
     ret = safewrite(fd, data, len);
     if (ret < 0) {
-        VIR_WARN(_("Failed to write to socket %d\n"), fd);
+        VIR_WARN(_("Failed to write to socket %d"), fd);
         return(-1);
     }
-    VIR_DEBUG("wrote %d bytes to socket %d\n",
+    VIR_DEBUG("wrote %d bytes to socket %d",
               len, fd);
 
     return(0);
@@ -451,7 +451,7 @@ retry:
         goto error;
     }
     if (res->serial != serial) {
-        VIR_WARN(_("got asynchronous packet number %d\n"), res->serial);
+        VIR_WARN(_("got asynchronous packet number %d"), res->serial);
         goto retry;
     }
 
diff --git a/tools/console.c b/tools/console.c
index 4a1a80b..3bb97ec 100644
--- a/tools/console.c
+++ b/tools/console.c
@@ -73,7 +73,7 @@ int vshRunConsole(const char *tty) {
 
     /* We do not want this to become the controlling TTY */
     if ((ttyfd = open(tty, O_NOCTTY | O_RDWR)) < 0) {
-        VIR_ERROR(_("unable to open tty %s: %s\n"),
+        VIR_ERROR(_("unable to open tty %s: %s"),
                   tty, strerror(errno));
         return -1;
     }
@@ -84,7 +84,7 @@ int vshRunConsole(const char *tty) {
        also ensure Ctrl-C, etc is blocked, and misc
        other bits */
     if (tcgetattr(STDIN_FILENO, &ttyattr) < 0) {
-        VIR_ERROR(_("unable to get tty attributes: %s\n"),
+        VIR_ERROR(_("unable to get tty attributes: %s"),
                   strerror(errno));
         goto closetty;
     }
@@ -93,7 +93,7 @@ int vshRunConsole(const char *tty) {
     cfmakeraw(&rawattr);
 
     if (tcsetattr(STDIN_FILENO, TCSAFLUSH, &rawattr) < 0) {
-        VIR_ERROR(_("unable to set tty attributes: %s\n"),
+        VIR_ERROR(_("unable to set tty attributes: %s"),
                   strerror(errno));
         goto closetty;
     }
@@ -128,7 +128,7 @@ int vshRunConsole(const char *tty) {
             if (errno == EINTR || errno == EAGAIN)
                 continue;
 
-            VIR_ERROR(_("failure waiting for I/O: %s\n"), strerror(errno));
+            VIR_ERROR(_("failure waiting for I/O: %s"), strerror(errno));
             goto cleanup;
         }
 
@@ -142,7 +142,7 @@ int vshRunConsole(const char *tty) {
                 int got, sent = 0, destfd;
 
                 if ((got = read(fds[i].fd, buf, sizeof(buf))) < 0) {
-                    VIR_ERROR(_("failure reading input: %s\n"),
+                    VIR_ERROR(_("failure reading input: %s"),
                               strerror(errno));
                     goto cleanup;
                 }
@@ -164,7 +164,7 @@ int vshRunConsole(const char *tty) {
                     int done;
                     if ((done = safewrite(destfd, buf + sent, got - sent))
                         <= 0) {
-                        VIR_ERROR(_("failure writing output: %s\n"),
+                        VIR_ERROR(_("failure writing output: %s"),
                                   strerror(errno));
                         goto cleanup;
                     }
-- 
1.6.6

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