char ebuf[1024];
if (VIR_ALLOC(sock) < 0) {
- VIR_ERROR("%s", _("Failed to allocate memory for struct qemud_socket"));
+ VIR_ERROR0(_("Failed to allocate memory for struct qemud_socket"));
return -1;
}
server->sigread = server->sigwrite = -1;
if (virMutexInit(&server->lock) < 0) {
- VIR_ERROR("%s", _("cannot initialize mutex"));
+ VIR_ERROR0(_("cannot initialize mutex"));
VIR_FREE(server);
return NULL;
}
if (virCondInit(&server->job) < 0) {
- VIR_ERROR("%s", _("cannot initialize condition variable"));
+ VIR_ERROR0(_("cannot initialize condition variable"));
virMutexDestroy(&server->lock);
VIR_FREE(server);
return NULL;
if (VIR_ALLOC(client) < 0)
goto cleanup;
if (virMutexInit(&client->lock) < 0) {
- VIR_ERROR("%s", _("cannot initialize mutex"));
+ VIR_ERROR0(_("cannot initialize mutex"));
VIR_FREE(client);
goto cleanup;
}
maxbuf = 1024;
if (VIR_ALLOC_N(buf, maxbuf) < 0) {
- VIR_ERROR("%s", _("Failed to allocate memory for buffer"));
+ VIR_ERROR0(_("Failed to allocate memory for buffer"));
goto free_and_fail;
}
&grp)) == ERANGE) {
maxbuf *= 2;
if (maxbuf > 65536 || VIR_REALLOC_N(buf, maxbuf) < 0) {
- VIR_ERROR("%s", _("Failed to reallocate enough memory for buffer"));
+ VIR_ERROR0(_("Failed to reallocate enough memory for buffer"));
goto free_and_fail;
}
}
dom->conn);
if (lpar_name == NULL) {
- VIR_ERROR("%s", "Unable to determine domain's name.");
+ VIR_ERROR0("Unable to determine domain's name.");
goto err;
}
if (phypGetLparUUID(def.uuid, dom->id, dom->conn) == -1) {
- VIR_ERROR("%s", "Unable to generate random uuid.");
+ VIR_ERROR0("Unable to generate random uuid.");
goto err;
}
if ((def.maxmem =
phypGetLparMem(dom->conn, managed_system, dom->id, 0)) == 0) {
- VIR_ERROR("%s", "Unable to determine domain's max memory.");
+ VIR_ERROR0("Unable to determine domain's max memory.");
goto err;
}
if ((def.memory =
phypGetLparMem(dom->conn, managed_system, dom->id, 1)) == 0) {
- VIR_ERROR("%s", "Unable to determine domain's memory.");
+ VIR_ERROR0("Unable to determine domain's memory.");
goto err;
}
if ((def.vcpus =
phypGetLparCPU(dom->conn, managed_system, dom->id)) == 0) {
- VIR_ERROR("%s", "Unable to determine domain's CPU.");
+ VIR_ERROR0("Unable to determine domain's CPU.");
goto err;
}
}
if (phypUUIDTable_AddLpar(conn, def->uuid, def->id) == -1) {
- VIR_ERROR("%s", "Unable to add LPAR to the table");
+ VIR_ERROR0("Unable to add LPAR to the table");
goto err;
}
if (safewrite(fd, &uuid_table->lpars[i]->id,
sizeof(uuid_table->lpars[i]->id)) !=
sizeof(uuid_table->lpars[i]->id)) {
- VIR_ERROR("%s", "Unable to write information to local file.");
+ VIR_ERROR0("Unable to write information to local file.");
goto err;
}
if (safewrite(fd, uuid_table->lpars[i]->uuid, VIR_UUID_BUFLEN) !=
VIR_UUID_BUFLEN) {
- VIR_ERROR("%s", "Unable to write information to local file.");
+ VIR_ERROR0("Unable to write information to local file.");
goto err;
}
}
for (i = 0, pp = p->list; pp; ++i, pp = pp->next) {
int ctl;
if (pp->type != VIR_CONF_STRING) {
- VIR_ERROR("%s", _("cgroup_controllers must be a list of strings"));
+ VIR_ERROR0(_("cgroup_controllers must be a list of strings"));
virConfFree(conf);
return -1;
}
}
for (i = 0, pp = p->list; pp; ++i, pp = pp->next) {
if (pp->type != VIR_CONF_STRING) {
- VIR_ERROR("%s", _("cgroup_device_acl must be a list of strings"));
+ VIR_ERROR0(_("cgroup_device_acl must be a list of strings"));
virConfFree(conf);
return -1;
}
return -1;
if (virMutexInit(&qemu_driver->lock) < 0) {
- VIR_ERROR("%s", _("cannot initialize mutex"));
+ VIR_ERROR0(_("cannot initialize mutex"));
VIR_FREE(qemu_driver);
return -1;
}