提交 3163224b 编写于 作者: J Jim Meyering

ReportError: mark for translation string args to this function

* Makefile.maint (msg_gen_function): Add ReportError.
* src/util.c (_virExec): Mark strings.
上级 56a3cb80
Thu Mar 27 14:36:56 CET 2008 Jim Meyering <meyering@redhat.com>
ReportError: mark for translation string args to this function
* Makefile.maint (msg_gen_function): Add ReportError.
* src/util.c (_virExec): Mark strings.
xenXMError: mark for translation string args to this function
* Makefile.maint (msg_gen_function): Add xenXMError.
* src/xm_internal.c (xenXMParseXMLToConfig, xenXMDomainDefineXML):
......
......@@ -313,9 +313,9 @@ msg_gen_function += qemudLog
msg_gen_function += remoteDispatchError
msg_gen_function += virStorageLog
msg_gen_function += xenXMError
msg_gen_function += ReportError
# msg_gen_function += virXenError
# msg_gen_function += ReportError
# msg_gen_function += testError
# msg_gen_function += openvzLog
# msg_gen_function += qemudReportError
......
......@@ -106,21 +106,22 @@ _virExec(virConnectPtr conn,
int pipeerr[2] = {-1,-1};
if ((null = open(_PATH_DEVNULL, O_RDONLY)) < 0) {
ReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR, "cannot open %s : %s",
_PATH_DEVNULL, strerror(errno));
ReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
_("cannot open %s: %s"),
_PATH_DEVNULL, strerror(errno));
goto cleanup;
}
if ((outfd != NULL && pipe(pipeout) < 0) ||
(errfd != NULL && pipe(pipeerr) < 0)) {
ReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR, "cannot create pipe : %s",
strerror(errno));
ReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
_("cannot create pipe: %s"), strerror(errno));
goto cleanup;
}
if ((pid = fork()) < 0) {
ReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR, "cannot fork child process : %s",
strerror(errno));
ReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
_("cannot fork child process: %s"), strerror(errno));
goto cleanup;
}
......@@ -131,11 +132,11 @@ _virExec(virConnectPtr conn,
if(non_block)
if(virSetNonBlock(pipeout[0]) == -1)
ReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
"Failed to set non-blocking file descriptor flag");
_("Failed to set non-blocking file descriptor flag"));
if(virSetCloseExec(pipeout[0]) == -1)
ReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
"Failed to set close-on-exec file descriptor flag");
_("Failed to set close-on-exec file descriptor flag"));
*outfd = pipeout[0];
}
if (errfd) {
......@@ -143,11 +144,11 @@ _virExec(virConnectPtr conn,
if(non_block)
if(virSetNonBlock(pipeerr[0]) == -1)
ReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
"Failed to set non-blocking file descriptor flag");
_("Failed to set non-blocking file descriptor flag"));
if(virSetCloseExec(pipeerr[0]) == -1)
ReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
"Failed to set close-on-exec file descriptor flag");
_("Failed to set close-on-exec file descriptor flag"));
*errfd = pipeerr[0];
}
*retpid = pid;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册