You need to sign in or sign up before continuing.
提交 3f76a993 编写于 作者: J Jim Meyering

maint: use VIR_WARN0("...") rather than VIR_WARN("%s", "...")

Run this command:
  git grep -l 'VIR_WARN("%s", "'|xargs perl -pi -e \
    's/VIR_WARN\("%s", "/VIR_WARN0("/'
* src/phyp/phyp_driver.c (phypDomainGetInfo): Perform the above.
(phypDomainCreateAndStart, phypUUIDTable_ReadFile): Likewise.
上级 052893cf
...@@ -1344,15 +1344,15 @@ phypDomainGetInfo(virDomainPtr dom, virDomainInfoPtr info) ...@@ -1344,15 +1344,15 @@ phypDomainGetInfo(virDomainPtr dom, virDomainInfoPtr info)
if ((info->maxMem = if ((info->maxMem =
phypGetLparMem(dom->conn, managed_system, dom->id, 0)) == 0) phypGetLparMem(dom->conn, managed_system, dom->id, 0)) == 0)
VIR_WARN("%s", "Unable to determine domain's max memory."); VIR_WARN0("Unable to determine domain's max memory.");
if ((info->memory = if ((info->memory =
phypGetLparMem(dom->conn, managed_system, dom->id, 1)) == 0) phypGetLparMem(dom->conn, managed_system, dom->id, 1)) == 0)
VIR_WARN("%s", "Unable to determine domain's memory."); VIR_WARN0("Unable to determine domain's memory.");
if ((info->nrVirtCpu = if ((info->nrVirtCpu =
phypGetLparCPU(dom->conn, managed_system, dom->id)) == 0) phypGetLparCPU(dom->conn, managed_system, dom->id)) == 0)
VIR_WARN("%s", "Unable to determine domain's CPU."); VIR_WARN0("Unable to determine domain's CPU.");
return 0; return 0;
} }
...@@ -1416,14 +1416,14 @@ phypDomainCreateAndStart(virConnectPtr conn, ...@@ -1416,14 +1416,14 @@ phypDomainCreateAndStart(virConnectPtr conn,
/* checking if this name already exists on this system */ /* checking if this name already exists on this system */
if (phypGetLparID(session, managed_system, def->name, conn) == -1) { if (phypGetLparID(session, managed_system, def->name, conn) == -1) {
VIR_WARN("%s", "LPAR name already exists."); VIR_WARN0("LPAR name already exists.");
goto err; goto err;
} }
/* checking if ID or UUID already exists on this system */ /* checking if ID or UUID already exists on this system */
for (i = 0; i < uuid_table->nlpars; i++) { for (i = 0; i < uuid_table->nlpars; i++) {
if (lpars[i]->id == def->id || lpars[i]->uuid == def->uuid) { if (lpars[i]->id == def->id || lpars[i]->uuid == def->uuid) {
VIR_WARN("%s", "LPAR ID or UUID already exists."); VIR_WARN0("LPAR ID or UUID already exists.");
goto err; goto err;
} }
} }
...@@ -1782,7 +1782,7 @@ phypUUIDTable_ReadFile(virConnectPtr conn) ...@@ -1782,7 +1782,7 @@ phypUUIDTable_ReadFile(virConnectPtr conn)
int id; int id;
if ((fd = open(local_file, O_RDONLY)) == -1) { if ((fd = open(local_file, O_RDONLY)) == -1) {
VIR_WARN("%s", "Unable to write information to local file."); VIR_WARN0("Unable to write information to local file.");
goto err; goto err;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册