X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/e5c3c8accffbcd77fea12ccf2b0accc70c645aaa..9b8e0c494de6b447b44454112748f702dffec90d:/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..f24a519 100644 --- a/lunaix-os/kernel/demos/input_test.c +++ b/lunaix-os/kernel/demos/input_test.c @@ -1,8 +1,10 @@ -#include -#include #include -#include + #include +#include +#include +#include +#include #define STDIN 1 #define STDOUT 0 @@ -13,7 +15,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)", errno); return; } @@ -27,7 +29,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,