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

[libvirt] [PATCH 08/10] maint: don't mark VIR_DEBUG or VIR_DEBUG0 diagnostics for translation



From: Jim Meyering <meyering redhat com>

Run this command:
  git grep -l VIR_DEBUG|xargs perl -pi -e \
    's/(VIR_DEBUG0?)\s*\(_\((".*?")\)/$1($2/'
---
 ...-Step-7-of-8-Implement-the-driver-methods.patch |    4 +-
 src/node_device/node_device_driver.c               |    2 +-
 src/node_device/node_device_linux_sysfs.c          |    6 ++--
 src/qemu/qemu_conf.c                               |    2 +-
 src/storage/storage_backend_scsi.c                 |   38 ++++++++++----------
 5 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/docs/api_extension/0007-Step-7-of-8-Implement-the-driver-methods.patch b/docs/api_extension/0007-Step-7-of-8-Implement-the-driver-methods.patch
index 807ed78..ff1124f 100644
--- a/docs/api_extension/0007-Step-7-of-8-Implement-the-driver-methods.patch
+++ b/docs/api_extension/0007-Step-7-of-8-Implement-the-driver-methods.patch
@@ -146,7 +146,7 @@ index b84729f..4f73baf 100644
 +        goto cleanup;
 +    }
 +
-+    VIR_DEBUG(_("Vport operation path is '%s'"), operation_path);
++    VIR_DEBUG("Vport operation path is '%s'", operation_path);
 +
 +    fd = open(operation_path, O_WRONLY);
 +
@@ -959,7 +959,7 @@ index 0000000..1deb6d2
 +    char buf[64];
 +    struct stat st;
 +
-+    VIR_DEBUG(_("Checking if host%d is an FC HBA"), d->scsi_host.host);
++    VIR_DEBUG("Checking if host%d is an FC HBA", d->scsi_host.host);
 +
 +    if (virAsprintf(&sysfs_path, "%s/host%d",
 +                    LINUX_SYSFS_FC_HOST_PREFIX,
diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_device_driver.c
index b0ea986..a6c1fa0 100644
--- a/src/node_device/node_device_driver.c
+++ b/src/node_device/node_device_driver.c
@@ -432,7 +432,7 @@ nodeDeviceVportCreateDelete(const int parent_host,
         goto cleanup;
     }

-    VIR_DEBUG(_("Vport operation path is '%s'"), operation_path);
+    VIR_DEBUG("Vport operation path is '%s'", operation_path);

     if (virAsprintf(&vport_name,
                     "%s:%s",
diff --git a/src/node_device/node_device_linux_sysfs.c b/src/node_device/node_device_linux_sysfs.c
index 142b882..c90e72b 100644
--- a/src/node_device/node_device_linux_sysfs.c
+++ b/src/node_device/node_device_linux_sysfs.c
@@ -53,7 +53,7 @@ static int open_wwn_file(const char *prefix,

     /* fd will be closed by caller */
     if ((*fd = open(wwn_path, O_RDONLY)) != -1) {
-        VIR_DEBUG(_("Opened WWN path '%s' for reading"),
+        VIR_DEBUG("Opened WWN path '%s' for reading",
                   wwn_path);
     } else {
         VIR_ERROR(_("Failed to open WWN path '%s' for reading"),
@@ -79,7 +79,7 @@ int read_wwn_linux(int host, const char *file, char **wwn)
     memset(buf, 0, sizeof(buf));
     if (saferead(fd, buf, sizeof(buf)) < 0) {
         retval = -1;
-        VIR_DEBUG(_("Failed to read WWN for host%d '%s'"),
+        VIR_DEBUG("Failed to read WWN for host%d '%s'",
                   host, file);
         goto out;
     }
@@ -117,7 +117,7 @@ int check_fc_host_linux(union _virNodeDevCapData *d)
     int retval = 0;
     struct stat st;

-    VIR_DEBUG(_("Checking if host%d is an FC HBA"), d->scsi_host.host);
+    VIR_DEBUG("Checking if host%d is an FC HBA", d->scsi_host.host);

     if (virAsprintf(&sysfs_path, "%s/host%d",
                     LINUX_SYSFS_FC_HOST_PREFIX,
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index ee24c4c..5c14eb8 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -727,7 +727,7 @@ qemudProbeCPUModels(const char *qemu,
     if (STREQ(arch, "i686") || STREQ(arch, "x86_64"))
         parse = qemudParseX86Models;
     else {
-        VIR_DEBUG(_("don't know how to parse %s CPU models"), arch);
+        VIR_DEBUG("don't know how to parse %s CPU models", arch);
         return 0;
     }

diff --git a/src/storage/storage_backend_scsi.c b/src/storage/storage_backend_scsi.c
index 0260818..cd01f93 100644
--- a/src/storage/storage_backend_scsi.c
+++ b/src/storage/storage_backend_scsi.c
@@ -92,7 +92,7 @@ getDeviceType(uint32_t host,
         goto out;
     }

-    VIR_DEBUG(_("Device type is %d"), *type);
+    VIR_DEBUG("Device type is %d", *type);

 out:
     VIR_FREE(type_path);
@@ -221,7 +221,7 @@ virStorageBackendSCSINewLun(virStoragePoolObjPtr pool,
         goto free_vol;
     }

-    VIR_DEBUG(_("Trying to create volume for '%s'"), devpath);
+    VIR_DEBUG("Trying to create volume for '%s'", devpath);

     /* Now figure out the stable path
      *
@@ -239,7 +239,7 @@ virStorageBackendSCSINewLun(virStoragePoolObjPtr pool,
         !(STREQ(pool->def->target.path, "/dev") ||
           STREQ(pool->def->target.path, "/dev/"))) {

-        VIR_DEBUG(_("No stable path found for '%s' in '%s'"),
+        VIR_DEBUG("No stable path found for '%s' in '%s'",
                   devpath, pool->def->target.path);

         retval = -1;
@@ -301,7 +301,7 @@ getNewStyleBlockDevice(const char *lun_path,
         goto out;
     }

-    VIR_DEBUG(_("Looking for block device in '%s'"), block_path);
+    VIR_DEBUG("Looking for block device in '%s'", block_path);

     block_dir = opendir(block_path);
     if (block_dir == NULL) {
@@ -327,7 +327,7 @@ getNewStyleBlockDevice(const char *lun_path,
             goto out;
         }

-        VIR_DEBUG(_("Block device is '%s'"), *block_device);
+        VIR_DEBUG("Block device is '%s'", *block_device);

         break;
     }
@@ -366,7 +366,7 @@ getOldStyleBlockDevice(const char *lun_path ATTRIBUTE_UNUSED,
             goto out;
         }

-        VIR_DEBUG(_("Block device is '%s'"), *block_device);
+        VIR_DEBUG("Block device is '%s'", *block_device);
     }

 out:
@@ -436,7 +436,7 @@ processLU(virStoragePoolObjPtr pool,
     int device_type;
     char *block_device = NULL;

-    VIR_DEBUG(_("Processing LU %u:%u:%u:%u"),
+    VIR_DEBUG("Processing LU %u:%u:%u:%u",
               host, bus, target, lun);

     if (getDeviceType(host, bus, target, lun, &device_type) < 0) {
@@ -457,7 +457,7 @@ processLU(virStoragePoolObjPtr pool,
         goto out;
     }

-    VIR_DEBUG(_("%u:%u:%u:%u is a Direct-Access LUN"),
+    VIR_DEBUG("%u:%u:%u:%u is a Direct-Access LUN",
               host, bus, target, lun);

     if (getBlockDevice(host, bus, target, lun, &block_device) < 0) {
@@ -467,13 +467,13 @@ processLU(virStoragePoolObjPtr pool,
     if (virStorageBackendSCSINewLun(pool,
                                     host, bus, target, lun,
                                     block_device) < 0) {
-        VIR_DEBUG(_("Failed to create new storage volume for %u:%u:%u:%u"),
+        VIR_DEBUG("Failed to create new storage volume for %u:%u:%u:%u",
                   host, bus, target, lun);
         retval = -1;
         goto out;
     }

-    VIR_DEBUG(_("Created new storage volume for %u:%u:%u:%u successfully"),
+    VIR_DEBUG("Created new storage volume for %u:%u:%u:%u successfully",
               host, bus, target, lun);

     VIR_FREE(type_path);
@@ -494,7 +494,7 @@ virStorageBackendSCSIFindLUs(virStoragePoolObjPtr pool,
     struct dirent *lun_dirent = NULL;
     char devicepattern[64];

-    VIR_DEBUG(_("Discovering LUs on host %u"), scanhost);
+    VIR_DEBUG("Discovering LUs on host %u", scanhost);

     virFileWaitForDevices();

@@ -520,7 +520,7 @@ virStorageBackendSCSIFindLUs(virStoragePoolObjPtr pool,
             continue;
         }

-        VIR_DEBUG(_("Found LU '%s'"), lun_dirent->d_name);
+        VIR_DEBUG("Found LU '%s'", lun_dirent->d_name);

         processLU(pool, scanhost, bus, target, lun);
     }
@@ -541,7 +541,7 @@ virStorageBackendSCSIGetHostNumber(const char *sysfs_path,
     DIR *sysdir = NULL;
     struct dirent *dirent = NULL;

-    VIR_DEBUG(_("Finding host number from '%s'"), sysfs_path);
+    VIR_DEBUG("Finding host number from '%s'", sysfs_path);

     virFileWaitForDevices();

@@ -558,7 +558,7 @@ virStorageBackendSCSIGetHostNumber(const char *sysfs_path,
         if (STREQLEN(dirent->d_name, "target", strlen("target"))) {
             if (sscanf(dirent->d_name,
                        "target%u:", host) != 1) {
-                VIR_DEBUG(_("Failed to parse target '%s'"), dirent->d_name);
+                VIR_DEBUG("Failed to parse target '%s'", dirent->d_name);
                 retval = -1;
                 break;
             }
@@ -578,7 +578,7 @@ virStorageBackendSCSITriggerRescan(uint32_t host)
     int retval = 0;
     char *path;

-    VIR_DEBUG(_("Triggering rescan of host %d"), host);
+    VIR_DEBUG("Triggering rescan of host %d", host);

     if (virAsprintf(&path, "/sys/class/scsi_host/host%u/scan", host) < 0) {
         virReportOOMError();
@@ -586,7 +586,7 @@ virStorageBackendSCSITriggerRescan(uint32_t host)
         goto out;
     }

-    VIR_DEBUG(_("Scan trigger path is '%s'"), path);
+    VIR_DEBUG("Scan trigger path is '%s'", path);

     fd = open(path, O_WRONLY);

@@ -612,7 +612,7 @@ virStorageBackendSCSITriggerRescan(uint32_t host)
 free_path:
     VIR_FREE(path);
 out:
-    VIR_DEBUG(_("Rescan of host %d complete"), host);
+    VIR_DEBUG("Rescan of host %d complete", host);
     return retval;
 }

@@ -627,13 +627,13 @@ virStorageBackendSCSIRefreshPool(virConnectPtr conn ATTRIBUTE_UNUSED,
     pool->def->allocation = pool->def->capacity = pool->def->available = 0;

     if (sscanf(pool->def->source.adapter, "host%u", &host) != 1) {
-        VIR_DEBUG(_("Failed to get host number from '%s'"),
+        VIR_DEBUG("Failed to get host number from '%s'",
                     pool->def->source.adapter);
         retval = -1;
         goto out;
     }

-    VIR_DEBUG(_("Scanning host%u"), host);
+    VIR_DEBUG("Scanning host%u", host);

     if (virStorageBackendSCSITriggerRescan(host) < 0) {
         retval = -1;
-- 
1.7.1.259.g3aef8


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