From f65c809fb7c269c2bf450274f424feab85ea95cb Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Wed, 12 Aug 2009 15:10:46 -0700 Subject: Print more useful messages for unknown replies, events & errors Signed-off-by: Alan Coopersmith --- print11.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'print11.c') diff --git a/print11.c b/print11.c index 3d7984a..e29ac23 100644 --- a/print11.c +++ b/print11.c @@ -413,6 +413,19 @@ ImplementationError ( PrintField(buf, 10, 1, CARD8, "major opcode"); } +void +UnknownError ( + const unsigned char *buf) +{ + PrintField(RBf, 1, 1, ERROR, ERRORHEADER); + if (Verbose < 1) + return; + printfield (buf, 2, 2, CARD16, "sequence number"); + PrintField(buf, 4, 4, CARD32, "bad resource id"); + PrintField(buf, 8, 2, CARD16, "minor opcode"); + PrintField(buf, 10, 1, CARD8, "major opcode"); +} + /* ************************************************************ */ /* */ /* */ @@ -940,6 +953,18 @@ MappingNotifyEvent ( PrintField(buf, 6, 1, CARD8, "count"); } +void +UnknownEvent ( + const unsigned char *buf) +{ + PrintField(buf, 0, 1, EVENT, EVENTHEADER); + if (Verbose < 1) + return; + PrintField(buf, 1, 1, CARD8, "detail"); + printfield (buf, 2, 2, CARD16, "sequence number"); + PrintBytes(&buf[4], 28, "data"); +} + /* ************************************************************ */ /* */ /* */ -- cgit v1.2.1