X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/b3b42765712afed5a35c9be5c832f4a06bd85e7a..c4510182f3c02e390184bee518940e325f064b20:/lunaix-os/kernel/demos/input_test.c?ds=sidebyside diff --git a/lunaix-os/kernel/demos/input_test.c b/lunaix-os/kernel/demos/input_test.c index b85f851..5f2a904 100644 --- a/lunaix-os/kernel/demos/input_test.c +++ b/lunaix-os/kernel/demos/input_test.c @@ -2,6 +2,7 @@ #include #include #include +#include #include #define STDIN 1 @@ -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,