X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/e5c3c8accffbcd77fea12ccf2b0accc70c645aaa..c6de44b989e9d7286337e4cbf4d82d919f9120e6:/lunaix-os/kernel/demos/input_test.c diff --git a/lunaix-os/kernel/demos/input_test.c b/lunaix-os/kernel/demos/input_test.c index b85f851..47e0081 100644 --- a/lunaix-os/kernel/demos/input_test.c +++ b/lunaix-os/kernel/demos/input_test.c @@ -1,6 +1,7 @@ #include #include #include +#include #include #include @@ -13,7 +14,7 @@ input_test() int fd = open("/dev/input/i8042-kbd", 0); if (fd < 0) { - printf("fail to open (%d)", fd); + printf("fail to open (%d)", geterrno()); return; } @@ -27,7 +28,7 @@ input_test() action = "release"; } - printf("%u: %s '%c', class=0x%x, scan=%d\n", + printf("%u: %s '%c', class=0x%x, scan=%x\n", event.timestamp, action, event.sys_code & 0xff,