aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2013-07-30 18:48:36 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2013-07-30 18:48:36 -0500
commitdbef7b17ad1d0be90696dc45b5b8162d8208643f (patch)
treeb1217e6c87910a5803a9b1fdaf64beb20543a473 /hw
parentc9dd6a9fa092827c38d21749a453bc56413411d7 (diff)
parent9b4f38e182d18cac217f04b8b7fddf760a5b9d44 (diff)
Merge remote-tracking branch 'borntraeger/s390-for-1.6' into staging
* borntraeger/s390-for-1.6: s390: Implement dump-guest-memory support for target s390x s390x/kvm: Remove redundant return code s390x/kvm: Reworked/fixed handling of cc3 in kvm_handle_css_inst() s390x/ioinst: Fixed priority of operand exceptions s390x/ioinst: Fixed alignment check in SCHM instruction s390x/ioinst: Throw addressing exception when memory_map failed s390x/ioinst: Add missing alignment checks for IO instructions s390/sclpconsole: handle char layer busy conditions Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/char/sclpconsole.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/hw/char/sclpconsole.c b/hw/char/sclpconsole.c
index bcc7893230..eb3988c2e4 100644
--- a/hw/char/sclpconsole.c
+++ b/hw/char/sclpconsole.c
@@ -184,8 +184,6 @@ static int read_event_data(SCLPEvent *event, EventBufferHeader *evt_buf_hdr,
static ssize_t write_console_data(SCLPEvent *event, const uint8_t *buf,
size_t len)
{
- ssize_t ret = 0;
- const uint8_t *iov_offset;
SCLPConsole *scon = DO_UPCAST(SCLPConsole, event, event);
if (!scon->chr) {
@@ -193,21 +191,7 @@ static ssize_t write_console_data(SCLPEvent *event, const uint8_t *buf,
return len;
}
- iov_offset = buf;
- while (len > 0) {
- ret = qemu_chr_fe_write(scon->chr, buf, len);
- if (ret == 0) {
- /* a pty doesn't seem to be connected - no error */
- len = 0;
- } else if (ret == -EAGAIN || (ret > 0 && ret < len)) {
- len -= ret;
- iov_offset += ret;
- } else {
- len = 0;
- }
- }
-
- return ret;
+ return qemu_chr_fe_write_all(scon->chr, buf, len);
}
static int write_event_data(SCLPEvent *event, EventBufferHeader *evt_buf_hdr)