qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Sergio Lopez <slp@redhat.com>
To: berrange@redhat.com, pbonzini@redhat.com,
	marcandre.lureau@redhat.com, mst@redhat.com
Cc: qemu-devel@nongnu.org, Sergio Lopez <slp@redhat.com>
Subject: [Qemu-devel] [PATCH 2/3] chardev: On QIO_CHANNEL_ERR_BROKEN set errno to EPIPE
Date: Thu, 31 May 2018 09:46:00 +0200	[thread overview]
Message-ID: <20180531074601.10647-3-slp@redhat.com> (raw)
In-Reply-To: <20180531074601.10647-1-slp@redhat.com>

This allows callers to identify this potentially unrecoverable error.
---
 chardev/char-io.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/chardev/char-io.c b/chardev/char-io.c
index f810524..f934eb9 100644
--- a/chardev/char-io.c
+++ b/chardev/char-io.c
@@ -168,6 +168,9 @@ int io_channel_send_full(QIOChannel *ioc,
 
             errno = EAGAIN;
             return -1;
+        } else if (ret == QIO_CHANNEL_ERR_BROKEN) {
+            errno = EPIPE;
+            return -1;
         } else if (ret < 0) {
             errno = EINVAL;
             return -1;
-- 
1.8.3.1

  parent reply	other threads:[~2018-05-31  7:46 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-31  7:45 [Qemu-devel] [PATCH 0/3] Avoid retrying on serial_xmit with EPIPE Sergio Lopez
2018-05-31  7:45 ` [Qemu-devel] [PATCH 1/3] io: Implement QIO_CHANNEL_ERR_BROKEN Sergio Lopez
2018-06-01 11:50   ` Daniel P. Berrangé
2018-05-31  7:46 ` Sergio Lopez [this message]
2018-05-31  9:48   ` [Qemu-devel] [PATCH 2/3] chardev: On QIO_CHANNEL_ERR_BROKEN set errno to EPIPE Marc-André Lureau
2018-05-31 11:03     ` Sergio Lopez
2018-06-01 11:51   ` Daniel P. Berrangé
2018-05-31  7:46 ` [Qemu-devel] [PATCH 3/3] hw/char/serial: Don't retry on serial_xmit if errno == EPIPE Sergio Lopez
2018-05-31  9:52   ` Marc-André Lureau
2018-05-31 11:03     ` Sergio Lopez
2018-05-31 11:07       ` Marc-André Lureau
2018-06-01 11:52     ` Daniel P. Berrangé
2018-06-01 12:05       ` Sergio Lopez
2018-06-01 12:16         ` Paolo Bonzini
2018-06-01 12:28           ` Sergio Lopez
2018-06-01 12:31             ` Paolo Bonzini
2018-06-01 12:43             ` Peter Maydell
2018-06-01 16:20               ` Sergio Lopez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180531074601.10647-3-slp@redhat.com \
    --to=slp@redhat.com \
    --cc=berrange@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).