authdismissed = (pkout && strstr(pkout, "dismissed=true"));
if (status != 0) {
- char *tmp = virCommandTranslateStatus(status);
+ char *tmp = virProcessTranslateStatus(status);
VIR_ERROR(_("Policy kit denied action %s from pid %lld, uid %d: %s"),
action, (long long) callerPid, callerUid, NULLSTR(tmp));
VIR_FREE(tmp);
/**
- * virCommandTranslateStatus:
+ * virProcessTranslateStatus:
* @status: child exit status to translate
*
* Translate an exit status into a malloc'd string. Generic helper
* status argument, as well as raw waitpid().
*/
char *
-virCommandTranslateStatus(int status)
+virProcessTranslateStatus(int status)
{
char *buf;
if (WIFEXITED(status)) {
if (virCommandWait(cmd, exitstatus) < 0)
ret = -1;
- str = (exitstatus ? virCommandTranslateStatus(*exitstatus)
+ str = (exitstatus ? virProcessTranslateStatus(*exitstatus)
: (char *) "status 0");
VIR_DEBUG("Result %s, stdout: '%s' stderr: '%s'",
NULLSTR(str),
if (exitstatus == NULL) {
if (status != 0) {
- char *st = virCommandTranslateStatus(status);
+ char *st = virProcessTranslateStatus(status);
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Child process (%lld) unexpected %s"),
(long long) pid, NULLSTR(st));
cmd->reap = false;
if (status) {
char *str = virCommandToString(cmd);
- char *st = virCommandTranslateStatus(status);
+ char *st = virProcessTranslateStatus(status);
bool haveErrMsg = cmd->errbuf && *cmd->errbuf && (*cmd->errbuf)[0];
virReportError(VIR_ERR_INTERNAL_ERROR,
while ((ret = waitpid(pid, &status, WNOHANG)) == -1 &&
errno == EINTR);
if (ret == pid) {
- tmp = virCommandTranslateStatus(status);
+ tmp = virProcessTranslateStatus(status);
VIR_DEBUG("process has ended: %s", tmp);
goto cleanup;
} else if (ret == 0) {
while ((ret = waitpid(pid, &status, WNOHANG)) == -1 &&
errno == EINTR);
if (ret == pid) {
- tmp = virCommandTranslateStatus(status);
+ tmp = virProcessTranslateStatus(status);
VIR_DEBUG("process has ended: %s", tmp);
goto cleanup;
} else if (ret == 0) {
while ((ret = waitpid(pid, &status, 0)) == -1 &&
errno == EINTR);
if (ret == pid) {
- tmp = virCommandTranslateStatus(status);
+ tmp = virProcessTranslateStatus(status);
VIR_DEBUG("process has ended: %s", tmp);
goto cleanup;
}