/* 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"),
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;
}
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,
goto out;
}
- VIR_DEBUG(_("Device type is %d"), *type);
+ VIR_DEBUG("Device type is %d", *type);
out:
VIR_FREE(type_path);
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
*
!(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;
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) {
goto out;
}
- VIR_DEBUG(_("Block device is '%s'"), *block_device);
+ VIR_DEBUG("Block device is '%s'", *block_device);
break;
}
goto out;
}
- VIR_DEBUG(_("Block device is '%s'"), *block_device);
+ VIR_DEBUG("Block device is '%s'", *block_device);
}
out:
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) {
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) {
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);
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();
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);
}
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();
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;
}
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();
goto out;
}
- VIR_DEBUG(_("Scan trigger path is '%s'"), path);
+ VIR_DEBUG("Scan trigger path is '%s'", path);
fd = open(path, O_WRONLY);
free_path:
VIR_FREE(path);
out:
- VIR_DEBUG(_("Rescan of host %d complete"), host);
+ VIR_DEBUG("Rescan of host %d complete", host);
return retval;
}
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;