aboutsummaryrefslogtreecommitdiff
path: root/pc-bios/s390-ccw/libc.h
diff options
context:
space:
mode:
authorJason J. Herne <jjherne@linux.ibm.com>2019-04-04 10:34:28 -0400
committerThomas Huth <thuth@redhat.com>2019-04-12 12:40:35 +0200
commit86c58705bb186cfa73a03851047da2c2c37b9418 (patch)
tree79341522b3483b0329ed2608729f638f93d98cf4 /pc-bios/s390-ccw/libc.h
parent3083a1bbb8716e9052fe375f68f330107ee13127 (diff)
downloadqemu-86c58705bb186cfa73a03851047da2c2c37b9418.zip
qemu-86c58705bb186cfa73a03851047da2c2c37b9418.tar.gz
qemu-86c58705bb186cfa73a03851047da2c2c37b9418.tar.bz2
s390-bios: cio error handling
Add verbose error output for when unexpected i/o errors happen. This eases the burden of debugging and reporting i/o errors. No error information is printed in the success case, here is an example of what is output on error: cio device error ssid : 0x0000000000000000 cssid : 0x0000000000000000 sch_no: 0x0000000000000000 Interrupt Response Block Data: Function Ctrl : [Start] Activity Ctrl : [Start-Pending] Status Ctrl : [Alert] [Primary] [Secondary] [Status-Pending] Device Status : [Unit-Check] Channel Status : cpa=: 0x000000007f8d6038 prev_ccw=: 0x0000000000000000 this_ccw=: 0x0000000000000000 Eckd Dasd Sense Data (fmt 32-bytes): Sense Condition Flags : Residual Count =: 0x0000000000000000 Phys Drive ID =: 0x000000000000009e low cyl address =: 0x0000000000000000 head addr & hi cyl =: 0x0000000000000000 format/message =: 0x0000000000000008 fmt-dependent[0-7] =: 0x0000000000000004 fmt-dependent[8-15]=: 0xe561282305082fff prog action code =: 0x0000000000000016 Configuration info =: 0x00000000000040e0 mcode / hi-cyl =: 0x0000000000000000 cyl & head addr [0]=: 0x0000000000000000 cyl & head addr [1]=: 0x0000000000000000 cyl & head addr [2]=: 0x0000000000000000 The Sense Data section is currently only printed for ECKD DASD. Signed-off-by: Jason J. Herne <jjherne@linux.ibm.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Message-Id: <1554388475-18329-10-git-send-email-jjherne@linux.ibm.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'pc-bios/s390-ccw/libc.h')
-rw-r--r--pc-bios/s390-ccw/libc.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/pc-bios/s390-ccw/libc.h b/pc-bios/s390-ccw/libc.h
index 818517f..bcdc457 100644
--- a/pc-bios/s390-ccw/libc.h
+++ b/pc-bios/s390-ccw/libc.h
@@ -67,6 +67,17 @@ static inline size_t strlen(const char *str)
return i;
}
+static inline char *strcat(char *dest, const char *src)
+{
+ int i;
+ char *dest_end = dest + strlen(dest);
+
+ for (i = 0; i <= strlen(src); i++) {
+ dest_end[i] = src[i];
+ }
+ return dest;
+}
+
static inline int isdigit(int c)
{
return (c >= '0') && (c <= '9');