diff --git a/src/util/command.c b/src/util/command.c index abd2dc4ae4..258dc138e8 100644 --- a/src/util/command.c +++ b/src/util/command.c @@ -1221,9 +1221,11 @@ virCommandWait(virCommandPtr cmd, int *exitstatus) if (exitstatus == NULL) { if (status != 0) { + char *str = virCommandToString(cmd); virCommandError(VIR_ERR_INTERNAL_ERROR, - _("Child process exited with status %d."), - WEXITSTATUS(status)); + _("Child process (%s) exited with status %d."), + str ? str : cmd->args[0], WEXITSTATUS(status)); + VIR_FREE(str); return -1; } } else {