maint: don't mark VIR_DEBUG or VIR_DEBUG0 diagnostics for translation

Run this command:
  git grep -l VIR_DEBUG|xargs perl -pi -e \
    's/(VIR_DEBUG0?)\s*\(_\((".*?")\)/$1($2/'
This commit is contained in:
Jim Meyering 2010-05-20 08:57:06 +02:00
parent 2f26addb25
commit d6f9cf4222
5 changed files with 26 additions and 26 deletions

View File

@ -146,7 +146,7 @@ index b84729f..4f73baf 100644
+ goto cleanup; + 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); + fd = open(operation_path, O_WRONLY);
+ +
@ -959,7 +959,7 @@ index 0000000..1deb6d2
+ char buf[64]; + char buf[64];
+ struct stat st; + 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", + if (virAsprintf(&sysfs_path, "%s/host%d",
+ LINUX_SYSFS_FC_HOST_PREFIX, + LINUX_SYSFS_FC_HOST_PREFIX,

View File

@ -432,7 +432,7 @@ nodeDeviceVportCreateDelete(const int parent_host,
goto cleanup; goto cleanup;
} }
VIR_DEBUG(_("Vport operation path is '%s'"), operation_path); VIR_DEBUG("Vport operation path is '%s'", operation_path);
if (virAsprintf(&vport_name, if (virAsprintf(&vport_name,
"%s:%s", "%s:%s",

View File

@ -53,7 +53,7 @@ static int open_wwn_file(const char *prefix,
/* fd will be closed by caller */ /* fd will be closed by caller */
if ((*fd = open(wwn_path, O_RDONLY)) != -1) { 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); wwn_path);
} else { } else {
VIR_ERROR(_("Failed to open WWN path '%s' for reading"), 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)); memset(buf, 0, sizeof(buf));
if (saferead(fd, buf, sizeof(buf)) < 0) { if (saferead(fd, buf, sizeof(buf)) < 0) {
retval = -1; retval = -1;
VIR_DEBUG(_("Failed to read WWN for host%d '%s'"), VIR_DEBUG("Failed to read WWN for host%d '%s'",
host, file); host, file);
goto out; goto out;
} }
@ -117,7 +117,7 @@ int check_fc_host_linux(union _virNodeDevCapData *d)
int retval = 0; int retval = 0;
struct stat st; 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", if (virAsprintf(&sysfs_path, "%s/host%d",
LINUX_SYSFS_FC_HOST_PREFIX, LINUX_SYSFS_FC_HOST_PREFIX,

View File

@ -727,7 +727,7 @@ qemudProbeCPUModels(const char *qemu,
if (STREQ(arch, "i686") || STREQ(arch, "x86_64")) if (STREQ(arch, "i686") || STREQ(arch, "x86_64"))
parse = qemudParseX86Models; parse = qemudParseX86Models;
else { 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; return 0;
} }

View File

@ -92,7 +92,7 @@ getDeviceType(uint32_t host,
goto out; goto out;
} }
VIR_DEBUG(_("Device type is %d"), *type); VIR_DEBUG("Device type is %d", *type);
out: out:
VIR_FREE(type_path); VIR_FREE(type_path);
@ -221,7 +221,7 @@ virStorageBackendSCSINewLun(virStoragePoolObjPtr pool,
goto free_vol; 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 /* 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") ||
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); devpath, pool->def->target.path);
retval = -1; retval = -1;
@ -301,7 +301,7 @@ getNewStyleBlockDevice(const char *lun_path,
goto out; 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); block_dir = opendir(block_path);
if (block_dir == NULL) { if (block_dir == NULL) {
@ -327,7 +327,7 @@ getNewStyleBlockDevice(const char *lun_path,
goto out; goto out;
} }
VIR_DEBUG(_("Block device is '%s'"), *block_device); VIR_DEBUG("Block device is '%s'", *block_device);
break; break;
} }
@ -366,7 +366,7 @@ getOldStyleBlockDevice(const char *lun_path ATTRIBUTE_UNUSED,
goto out; goto out;
} }
VIR_DEBUG(_("Block device is '%s'"), *block_device); VIR_DEBUG("Block device is '%s'", *block_device);
} }
out: out:
@ -436,7 +436,7 @@ processLU(virStoragePoolObjPtr pool,
int device_type; int device_type;
char *block_device = NULL; char *block_device = NULL;
VIR_DEBUG(_("Processing LU %u:%u:%u:%u"), VIR_DEBUG("Processing LU %u:%u:%u:%u",
host, bus, target, lun); host, bus, target, lun);
if (getDeviceType(host, bus, target, lun, &device_type) < 0) { if (getDeviceType(host, bus, target, lun, &device_type) < 0) {
@ -457,7 +457,7 @@ processLU(virStoragePoolObjPtr pool,
goto out; 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); host, bus, target, lun);
if (getBlockDevice(host, bus, target, lun, &block_device) < 0) { if (getBlockDevice(host, bus, target, lun, &block_device) < 0) {
@ -467,13 +467,13 @@ processLU(virStoragePoolObjPtr pool,
if (virStorageBackendSCSINewLun(pool, if (virStorageBackendSCSINewLun(pool,
host, bus, target, lun, host, bus, target, lun,
block_device) < 0) { 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); host, bus, target, lun);
retval = -1; retval = -1;
goto out; 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); host, bus, target, lun);
VIR_FREE(type_path); VIR_FREE(type_path);
@ -494,7 +494,7 @@ virStorageBackendSCSIFindLUs(virStoragePoolObjPtr pool,
struct dirent *lun_dirent = NULL; struct dirent *lun_dirent = NULL;
char devicepattern[64]; char devicepattern[64];
VIR_DEBUG(_("Discovering LUs on host %u"), scanhost); VIR_DEBUG("Discovering LUs on host %u", scanhost);
virFileWaitForDevices(); virFileWaitForDevices();
@ -520,7 +520,7 @@ virStorageBackendSCSIFindLUs(virStoragePoolObjPtr pool,
continue; 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); processLU(pool, scanhost, bus, target, lun);
} }
@ -541,7 +541,7 @@ virStorageBackendSCSIGetHostNumber(const char *sysfs_path,
DIR *sysdir = NULL; DIR *sysdir = NULL;
struct dirent *dirent = NULL; struct dirent *dirent = NULL;
VIR_DEBUG(_("Finding host number from '%s'"), sysfs_path); VIR_DEBUG("Finding host number from '%s'", sysfs_path);
virFileWaitForDevices(); virFileWaitForDevices();
@ -558,7 +558,7 @@ virStorageBackendSCSIGetHostNumber(const char *sysfs_path,
if (STREQLEN(dirent->d_name, "target", strlen("target"))) { if (STREQLEN(dirent->d_name, "target", strlen("target"))) {
if (sscanf(dirent->d_name, if (sscanf(dirent->d_name,
"target%u:", host) != 1) { "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; retval = -1;
break; break;
} }
@ -578,7 +578,7 @@ virStorageBackendSCSITriggerRescan(uint32_t host)
int retval = 0; int retval = 0;
char *path; 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) { if (virAsprintf(&path, "/sys/class/scsi_host/host%u/scan", host) < 0) {
virReportOOMError(); virReportOOMError();
@ -586,7 +586,7 @@ virStorageBackendSCSITriggerRescan(uint32_t host)
goto out; goto out;
} }
VIR_DEBUG(_("Scan trigger path is '%s'"), path); VIR_DEBUG("Scan trigger path is '%s'", path);
fd = open(path, O_WRONLY); fd = open(path, O_WRONLY);
@ -612,7 +612,7 @@ virStorageBackendSCSITriggerRescan(uint32_t host)
free_path: free_path:
VIR_FREE(path); VIR_FREE(path);
out: out:
VIR_DEBUG(_("Rescan of host %d complete"), host); VIR_DEBUG("Rescan of host %d complete", host);
return retval; return retval;
} }
@ -627,13 +627,13 @@ virStorageBackendSCSIRefreshPool(virConnectPtr conn ATTRIBUTE_UNUSED,
pool->def->allocation = pool->def->capacity = pool->def->available = 0; pool->def->allocation = pool->def->capacity = pool->def->available = 0;
if (sscanf(pool->def->source.adapter, "host%u", &host) != 1) { 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); pool->def->source.adapter);
retval = -1; retval = -1;
goto out; goto out;
} }
VIR_DEBUG(_("Scanning host%u"), host); VIR_DEBUG("Scanning host%u", host);
if (virStorageBackendSCSITriggerRescan(host) < 0) { if (virStorageBackendSCSITriggerRescan(host) < 0) {
retval = -1; retval = -1;