snprintf_error:
if (ret)
- VIR_ERROR("%s",
+ VIR_ERROR(_("%s"),
_("Resulting path too long for buffer in qemudInitPaths()"));
cleanup:
handle = dlopen(modfile, RTLD_NOW | RTLD_LOCAL);
if (!handle) {
- VIR_ERROR("failed to load module %s %s", modfile, dlerror());
+ VIR_ERROR(_("failed to load module %s %s"), modfile, dlerror());
goto cleanup;
}
regsym = dlsym(handle, regfunc);
if (!regsym) {
- VIR_ERROR("Missing module registration symbol %s", regfunc);
+ VIR_ERROR(_("Missing module registration symbol %s"), regfunc);
goto cleanup;
}
if ((*regsym)() < 0) {
- VIR_ERROR("Failed module registration %s", regfunc);
+ VIR_ERROR(_("Failed module registration %s"), regfunc);
goto cleanup;
}
for (i = 0 ; i < virStateDriverTabCount ; i++) {
if (virStateDriverTab[i]->initialize &&
virStateDriverTab[i]->initialize(privileged) < 0) {
- VIR_ERROR("Initialization of %s state driver failed",
+ VIR_ERROR(_("Initialization of %s state driver failed"),
virStateDriverTab[i]->name);
ret = -1;
}
fdArray[0].active = 0;
fdArray[1].fd = contPty;
fdArray[1].active = 0;
- VIR_ERROR("monitor=%d client=%d appPty=%d contPty=%d", monitor,client, appPty, contPty);
+ VIR_ERROR(_("monitor=%d client=%d appPty=%d contPty=%d"), monitor,client, appPty, contPty);
/* create the epoll fild descriptor */
epollFd = epoll_create(2);
if (0 > epollFd) {
failure:
if (dbus_error_is_set(&err)) {
- VIR_ERROR("%s: %s", err.name, err.message);
+ VIR_ERROR(_("%s: %s"), err.name, err.message);
dbus_error_free(&err);
}
virNodeDeviceObjListFree(&driverState->devs);
ret = virStrToLong_ui(s, end_ptr, base, result);
if (ret != 0) {
- VIR_ERROR("Failed to convert '%s' to unsigned int", s);
+ VIR_ERROR(_("Failed to convert '%s' to unsigned int"), s);
} else {
VIR_DEBUG("Converted '%s' to unsigned int %u", s, *result);
}
device_path = canonicalize_file_name (device_link);
if (device_path == NULL) {
memset(errbuf, '\0', sizeof(errbuf));
- VIR_ERROR("Failed to resolve device link '%s': '%s'", device_link,
+ VIR_ERROR(_("Failed to resolve device link '%s': '%s'"), device_link,
virStrerror(errno, errbuf, sizeof(errbuf)));
goto out;
}
}
if (parse_pci_config_address(config_address, *bdf) != 0) {
- VIR_ERROR("Failed to parse PCI config address '%s'", config_address);
+ VIR_ERROR(_("Failed to parse PCI config address '%s'"), config_address);
goto out;
}
/* We should not get back SRIOV_NOT_FOUND in this
* case, so if we do, it's an error. */
- VIR_ERROR("Failed to get SR IOV function from device link '%s'",
+ VIR_ERROR(_("Failed to get SR IOV function from device link '%s'"),
device_link);
goto out;
} else {
ret = virStrToLong_ull(s, end_ptr, base, result);
if (ret != 0) {
- VIR_ERROR("Failed to convert '%s' to unsigned long long", s);
+ VIR_ERROR(_("Failed to convert '%s' to unsigned long long"), s);
} else {
VIR_DEBUG("Converted '%s' to unsigned long %llu", s, *result);
}
ret = virStrToLong_ui(s, end_ptr, base, result);
if (ret != 0) {
- VIR_ERROR("Failed to convert '%s' to unsigned int", s);
+ VIR_ERROR(_("Failed to convert '%s' to unsigned int"), s);
} else {
VIR_DEBUG("Converted '%s' to unsigned int %u", s, *result);
}
ret = virStrToLong_i(s, end_ptr, base, result);
if (ret != 0) {
- VIR_ERROR("Failed to convert '%s' to int", s);
+ VIR_ERROR(_("Failed to convert '%s' to int"), s);
} else {
VIR_DEBUG("Converted '%s' to int %u", s, *result);
}
ret = -1;
virReportOOMError();
} else {
- VIR_ERROR("Failed to find SCSI device type %d", type);
+ VIR_ERROR(_("Failed to find SCSI device type %d"), type);
}
}
out:
if (ret != 0) {
- VIR_ERROR("Failed to process SCSI device with sysfs path '%s'",
+ VIR_ERROR(_("Failed to process SCSI device with sysfs path '%s'"),
def->sysfs_path);
}
return ret;
ret = udevProcessStorage(device, def);
break;
default:
- VIR_ERROR("Unknown device type %d", def->caps->type);
+ VIR_ERROR(_("Unknown device type %d"), def->caps->type);
ret = -1;
break;
}
nodeDeviceUnlock(driverState);
if (dev == NULL) {
- VIR_ERROR("Failed to create device for '%s'", def->name);
+ VIR_ERROR(_("Failed to create device for '%s'"), def->name);
virNodeDeviceDefFree(def);
goto out;
}
ret = udev_enumerate_scan_devices(udev_enumerate);
if (0 != ret) {
- VIR_ERROR("udev scan devices returned %d", ret);
+ VIR_ERROR(_("udev scan devices returned %d"), ret);
goto out;
}
if (device == NULL) {
device = udev_device_new_from_syspath(udev, DMI_DEVPATH_FALLBACK);
if (device == NULL) {
- VIR_ERROR("Failed to get udev device for syspath '%s' or '%s'",
+ VIR_ERROR(_("Failed to get udev device for syspath '%s' or '%s'"),
DMI_DEVPATH, DMI_DEVPATH_FALLBACK);
goto out;
}
dev = virNodeDeviceAssignDef(&driverState->devs, def);
if (dev == NULL) {
- VIR_ERROR("Failed to create device for '%s'", def->name);
+ VIR_ERROR(_("Failed to create device for '%s'"), def->name);
goto out;
}
break;
else if (ret[i] == '\n') {
if (virStrToLong_i(id_c, &char_ptr, 10, &ids[got]) == -1) {
- VIR_ERROR("Cannot parse number from '%s'", id_c);
+ VIR_ERROR(_("Cannot parse number from '%s'"), id_c);
goto err;
}
memset(id_c, 0, 10);
goto err;
if (nvcpus > phypGetLparCPUMAX(dom)) {
- VIR_ERROR("%s",
+ VIR_ERROR(_("%s"),
"You are trying to set a number of CPUs bigger than "
"the max possible..");
goto err;
ret = phypExec(session, cmd, &exit_status, dom->conn);
if (exit_status < 0) {
- VIR_ERROR("%s",
+ VIR_ERROR(_("%s"),
"Possibly you don't have IBM Tools installed in your LPAR."
"Contact your support to enable this feature.");
goto err;
ret = phypExec(session, cmd, &exit_status, conn);
if (exit_status < 0) {
- VIR_ERROR("%s\"%s\"", "Unable to create LPAR. Reason: ", ret);
+ VIR_ERROR(_("%s\"%s\""), "Unable to create LPAR. Reason: ", ret);
goto err;
}
/* end of file */
break;
} else {
- VIR_ERROR("Failed to read from '%s'", local_file);
+ VIR_ERROR(_("Failed to read from '%s'"), local_file);
goto err;
}
}
}
ctl = virCgroupControllerTypeFromString(pp->str);
if (ctl < 0) {
- VIR_ERROR("Unknown cgroup controller '%s'", pp->str);
+ VIR_ERROR(_("Unknown cgroup controller '%s'"), pp->str);
virConfFree(conf);
return -1;
}
virDomainObjLock(vm);
if (virAsprintf(&snapDir, "%s/%s", baseDir, vm->def->name) < 0) {
- VIR_ERROR("Failed to allocate memory for snapshot directory for domain %s",
+ VIR_ERROR(_("Failed to allocate memory for snapshot directory for domain %s"),
vm->def->name);
goto cleanup;
}
if (!(dir = opendir(snapDir))) {
if (errno != ENOENT)
- VIR_ERROR("Failed to open snapshot directory %s for domain %s: %s",
+ VIR_ERROR(_("Failed to open snapshot directory %s for domain %s: %s"),
snapDir, vm->def->name,
virStrerror(errno, ebuf, sizeof(ebuf)));
goto cleanup;
ret = virFileReadAll(fullpath, 1024*1024*1, &xmlStr);
if (ret < 0) {
/* Nothing we can do here, skip this one */
- VIR_ERROR("Failed to read snapshot file %s: %s", fullpath,
+ VIR_ERROR(_("Failed to read snapshot file %s: %s"), fullpath,
virStrerror(errno, ebuf, sizeof(ebuf)));
VIR_FREE(fullpath);
continue;
def = virDomainSnapshotDefParseString(xmlStr, 0);
if (def == NULL) {
/* Nothing we can do here, skip this one */
- VIR_ERROR("Failed to parse snapshot XML from file '%s'", fullpath);
+ VIR_ERROR(_("Failed to parse snapshot XML from file '%s'"), fullpath);
VIR_FREE(fullpath);
VIR_FREE(xmlStr);
continue;
# if DEBUG_RAW_IO
char *str1 = qemuMonitorEscapeNonPrintable(msg ? msg->txBuffer : "");
char *str2 = qemuMonitorEscapeNonPrintable(mon->buffer);
- VIR_ERROR("Process %d %p %p [[[[%s]]][[[%s]]]", (int)mon->bufferOffset, mon->msg, msg, str1, str2);
+ VIR_ERROR(_("Process %d %p %p [[[[%s]]][[[%s]]]"), (int)mon->bufferOffset, mon->msg, msg, str1, str2);
VIR_FREE(str1);
VIR_FREE(str2);
# else
#endif
if (mon->fd != fd || mon->watch != watch) {
- VIR_ERROR("event from unexpected fd %d!=%d / watch %d!=%d", mon->fd, fd, mon->watch, watch);
+ VIR_ERROR(_("event from unexpected fd %d!=%d / watch %d!=%d"), mon->fd, fd, mon->watch, watch);
failed = 1;
} else {
if (!mon->lastErrno &&
!virStoragePoolObjIsActive(pool)) {
virStorageBackendPtr backend;
if ((backend = virStorageBackendForType(pool->def->type)) == NULL) {
- VIR_ERROR("Missing backend %d", pool->def->type);
+ VIR_ERROR(_("Missing backend %d"), pool->def->type);
virStoragePoolObjUnlock(pool);
continue;
}
if (backend->startPool &&
backend->startPool(NULL, pool) < 0) {
virErrorPtr err = virGetLastError();
- VIR_ERROR("Failed to autostart storage pool '%s': %s",
+ VIR_ERROR(_("Failed to autostart storage pool '%s': %s"),
pool->def->name, err ? err->message :
"no error message found");
virStoragePoolObjUnlock(pool);
virErrorPtr err = virGetLastError();
if (backend->stopPool)
backend->stopPool(NULL, pool);
- VIR_ERROR("Failed to autostart storage pool '%s': %s",
+ VIR_ERROR(_("Failed to autostart storage pool '%s': %s"),
pool->def->name, err ? err->message :
"no error message found");
virStoragePoolObjUnlock(pool);
if (unlink(pool->autostartLink) < 0 && errno != ENOENT && errno != ENOTDIR) {
char ebuf[1024];
- VIR_ERROR("Failed to delete autostart link '%s': %s",
+ VIR_ERROR(_("Failed to delete autostart link '%s': %s"),
pool->autostartLink, virStrerror(errno, ebuf, sizeof ebuf));
}
def->type != VIR_DOMAIN_NET_TYPE_NETWORK)
continue;
- VIR_ERROR("Cleanup '%s'", def->ifname);
+ VIR_ERROR(_("Cleanup '%s'"), def->ifname);
err = brDeleteTap(brctl, def->ifname);
if (err) {
- VIR_ERROR("Cleanup failed %d", err);
+ VIR_ERROR(_("Cleanup failed %d"), err);
ret = -1;
}
}
rc = virCgroupDetectMounts(group);
if (rc < 0) {
- VIR_ERROR("Failed to detect mounts for %s", group->path);
+ VIR_ERROR(_("Failed to detect mounts for %s"), group->path);
return rc;
}
continue;
if (!group->controllers[i].placement) {
- VIR_ERROR("Could not find placement for controller %s at %s",
+ VIR_ERROR(_("Could not find placement for controller %s at %s"),
virCgroupControllerTypeToString(i),
group->controllers[i].placement);
rc = -ENOENT;
group->controllers[i].placement);
}
} else {
- VIR_ERROR("Failed to detect mapping for %s", group->path);
+ VIR_ERROR(_("Failed to detect mapping for %s"), group->path);
}
return rc;
inherit_values[i],
&value);
if (rc != 0) {
- VIR_ERROR("Failed to get %s %d", inherit_values[i], rc);
+ VIR_ERROR(_("Failed to get %s %d"), inherit_values[i], rc);
break;
}
VIR_FREE(value);
if (rc != 0) {
- VIR_ERROR("Failed to set %s %d", inherit_values[i], rc);
+ VIR_ERROR(_("Failed to set %s %d"), inherit_values[i], rc);
break;
}
}
capng_clear(CAPNG_SELECT_BOTH);
if ((ret = capng_apply(CAPNG_SELECT_BOTH)) < 0) {
- VIR_ERROR("cannot clear process capabilities %d", ret);
+ VIR_ERROR(_("cannot clear process capabilities %d"), ret);
return -1;
}