[libvirt] [PATCH] util: Correct the error prompt string

virCommandProcessIO: It's reading from stdout or stderr of child, but not reading. --- src/util/command.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/src/util/command.c b/src/util/command.c index cb682fc..81a2345 100644 --- a/src/util/command.c +++ b/src/util/command.c @@ -1504,7 +1504,9 @@ virCommandProcessIO(virCommandPtr cmd) if (errno != EINTR && errno != EAGAIN) { virReportSystemError(errno, "%s", - _("unable to write to child input")); + (fds[i].fd == outfd) ? + _("unable to read child stdout") : + _("unable to read child stderr")); goto cleanup; } } else if (done == 0) { -- 1.7.4

On 22.06.2011 11:30, Osier Yang wrote:
virCommandProcessIO: It's reading from stdout or stderr of child, but not reading. s/reading/writing/ --- src/util/command.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/util/command.c b/src/util/command.c index cb682fc..81a2345 100644 --- a/src/util/command.c +++ b/src/util/command.c @@ -1504,7 +1504,9 @@ virCommandProcessIO(virCommandPtr cmd) if (errno != EINTR && errno != EAGAIN) { virReportSystemError(errno, "%s", - _("unable to write to child input")); + (fds[i].fd == outfd) ? + _("unable to read child stdout") : + _("unable to read child stderr")); goto cleanup; } } else if (done == 0) { Nice catch.
ACK Michal

于 2011年06月22日 17:26, Michal Privoznik 写道:
On 22.06.2011 11:30, Osier Yang wrote:
virCommandProcessIO: It's reading from stdout or stderr of child, but not reading. s/reading/writing/ --- src/util/command.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/util/command.c b/src/util/command.c index cb682fc..81a2345 100644 --- a/src/util/command.c +++ b/src/util/command.c @@ -1504,7 +1504,9 @@ virCommandProcessIO(virCommandPtr cmd) if (errno != EINTR&& errno != EAGAIN) { virReportSystemError(errno, "%s", - _("unable to write to child input")); + (fds[i].fd == outfd) ? + _("unable to read child stdout") : + _("unable to read child stderr")); goto cleanup; } } else if (done == 0) { Nice catch.
ACK
Michal
Thanks, applied Osier
participants (2)
-
Michal Privoznik
-
Osier Yang