diff options
Diffstat (limited to 'Documentation/virtual/lguest/lguest.c')
-rw-r--r-- | Documentation/virtual/lguest/lguest.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Documentation/virtual/lguest/lguest.c b/Documentation/virtual/lguest/lguest.c index cd9d6af61d07..e3b9bb7a644a 100644 --- a/Documentation/virtual/lguest/lguest.c +++ b/Documentation/virtual/lguest/lguest.c | |||
@@ -861,8 +861,10 @@ static void console_output(struct virtqueue *vq) | |||
861 | /* writev can return a partial write, so we loop here. */ | 861 | /* writev can return a partial write, so we loop here. */ |
862 | while (!iov_empty(iov, out)) { | 862 | while (!iov_empty(iov, out)) { |
863 | int len = writev(STDOUT_FILENO, iov, out); | 863 | int len = writev(STDOUT_FILENO, iov, out); |
864 | if (len <= 0) | 864 | if (len <= 0) { |
865 | err(1, "Write to stdout gave %i", len); | 865 | warn("Write to stdout gave %i (%d)", len, errno); |
866 | break; | ||
867 | } | ||
866 | iov_consume(iov, out, len); | 868 | iov_consume(iov, out, len); |
867 | } | 869 | } |
868 | 870 | ||
@@ -898,7 +900,7 @@ static void net_output(struct virtqueue *vq) | |||
898 | * same format: what a coincidence! | 900 | * same format: what a coincidence! |
899 | */ | 901 | */ |
900 | if (writev(net_info->tunfd, iov, out) < 0) | 902 | if (writev(net_info->tunfd, iov, out) < 0) |
901 | errx(1, "Write to tun failed?"); | 903 | warnx("Write to tun failed (%d)?", errno); |
902 | 904 | ||
903 | /* | 905 | /* |
904 | * Done with that one; wait_for_vq_desc() will send the interrupt if | 906 | * Done with that one; wait_for_vq_desc() will send the interrupt if |
@@ -955,7 +957,7 @@ static void net_input(struct virtqueue *vq) | |||
955 | */ | 957 | */ |
956 | len = readv(net_info->tunfd, iov, in); | 958 | len = readv(net_info->tunfd, iov, in); |
957 | if (len <= 0) | 959 | if (len <= 0) |
958 | err(1, "Failed to read from tun."); | 960 | warn("Failed to read from tun (%d).", errno); |
959 | 961 | ||
960 | /* | 962 | /* |
961 | * Mark that packet buffer as used, but don't interrupt here. We want | 963 | * Mark that packet buffer as used, but don't interrupt here. We want |