[Pkg-libvirt-commits] [libguestfs] 247/266: p2v: Allow -EIO error when reading pty to mean the writer has closed the connection.

Hilko Bengen bengen at moszumanska.debian.org
Fri Oct 3 14:42:52 UTC 2014


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to annotated tag debian/1%1.27.35-1
in repository libguestfs.

commit b1125a9db71b51b9208571485e75774adee10017
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Mon Sep 1 15:55:56 2014 +0100

    p2v: Allow -EIO error when reading pty to mean the writer has closed the connection.
    
    This is apparently normal behaviour for ptys.
---
 p2v/conversion.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/p2v/conversion.c b/p2v/conversion.c
index 09cd774..f375805 100644
--- a/p2v/conversion.c
+++ b/p2v/conversion.c
@@ -233,11 +233,14 @@ start_conversion (struct config *config,
 
     r = read (control_h->fd, buf, sizeof buf - 1);
     if (r == -1) {
+      /* See comment about this in miniexpect.c. */
+      if (errno == EIO)
+        break;                  /* EOF */
       set_conversion_error ("read: %m");
       goto out;
     }
     if (r == 0)
-      break;
+      break;                    /* EOF */
     buf[r] = '\0';
     if (notify_ui)
       notify_ui (NOTIFY_REMOTE_MESSAGE, buf);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list