summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--evtest.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/evtest.c b/evtest.c
index 410efbc..a5525bf 100644
--- a/evtest.c
+++ b/evtest.c
@@ -451,20 +451,16 @@ int main (int argc, char **argv)
if (ev[i].type == EV_SYN) {
printf("-------------- %s ------------\n", syns[ev[i].code]);
- } else if (ev[i].type == EV_MSC && (ev[i].code == MSC_RAW || ev[i].code == MSC_SCAN)) {
- printf("type %d (%s), code %d (%s), value %02x\n",
- ev[i].type,
- events[ev[i].type] ? events[ev[i].type] : "?",
- ev[i].code,
- names[ev[i].type] ? (names[ev[i].type][ev[i].code] ? names[ev[i].type][ev[i].code] : "?") : "?",
- ev[i].value);
} else {
- printf("type %d (%s), code %d (%s), value %d\n",
+ printf("type %d (%s), code %d (%s), ",
ev[i].type,
events[ev[i].type] ? events[ev[i].type] : "?",
ev[i].code,
- names[ev[i].type] ? (names[ev[i].type][ev[i].code] ? names[ev[i].type][ev[i].code] : "?") : "?",
- ev[i].value);
+ names[ev[i].type] ? (names[ev[i].type][ev[i].code] ? names[ev[i].type][ev[i].code] : "?") : "?");
+ if (ev[i].type == EV_MSC && (ev[i].code == MSC_RAW || ev[i].code == MSC_SCAN))
+ printf("value %02x\n", ev[i].value);
+ else
+ printf("value %d\n", ev[i].value);
}
}