]> xenbits.xensource.com Git - libvirt.git/commitdiff
util: Correct the error prompt string
authorOsier Yang <jyang@redhat.com>
Wed, 22 Jun 2011 11:33:24 +0000 (19:33 +0800)
committerOsier Yang <jyang@redhat.com>
Wed, 22 Jun 2011 11:33:24 +0000 (19:33 +0800)
virCommandProcessIO: It's reading from stdout or stderr of child,
but not writing.

src/util/command.c

index cb682fca4e0a754fdf3721c50d09904068bc55a1..9fdeb0bf198c6217949681012c5c32cf15362980 100644 (file)
@@ -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) {