aboutsummaryrefslogtreecommitdiff
path: root/console-tools/setkeycodes.c
diff options
context:
space:
mode:
Diffstat (limited to 'console-tools/setkeycodes.c')
-rw-r--r--console-tools/setkeycodes.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/console-tools/setkeycodes.c b/console-tools/setkeycodes.c
index 85612c8b1..796bab285 100644
--- a/console-tools/setkeycodes.c
+++ b/console-tools/setkeycodes.c
@@ -43,7 +43,7 @@ setkeycodes_main(int argc, char** argv)
43 struct kbkeycode a; 43 struct kbkeycode a;
44 44
45 if (argc % 2 != 1 || argc < 2) { 45 if (argc % 2 != 1 || argc < 2) {
46 show_usage(); 46 bb_show_usage();
47 } 47 }
48 48
49 fd = get_console_fd(); 49 fd = get_console_fd();
@@ -52,18 +52,18 @@ setkeycodes_main(int argc, char** argv)
52 a.keycode = atoi(argv[2]); 52 a.keycode = atoi(argv[2]);
53 a.scancode = sc = strtol(argv[1], &ep, 16); 53 a.scancode = sc = strtol(argv[1], &ep, 16);
54 if (*ep) { 54 if (*ep) {
55 error_msg_and_die("error reading SCANCODE: '%s'", argv[1]); 55 bb_error_msg_and_die("error reading SCANCODE: '%s'", argv[1]);
56 } 56 }
57 if (a.scancode > 127) { 57 if (a.scancode > 127) {
58 a.scancode -= 0xe000; 58 a.scancode -= 0xe000;
59 a.scancode += 128; 59 a.scancode += 128;
60 } 60 }
61 if (a.scancode > 255 || a.keycode > 127) { 61 if (a.scancode > 255 || a.keycode > 127) {
62 error_msg_and_die("SCANCODE or KEYCODE outside bounds"); 62 bb_error_msg_and_die("SCANCODE or KEYCODE outside bounds");
63 } 63 }
64 if (ioctl(fd,KDSETKEYCODE,&a)) { 64 if (ioctl(fd,KDSETKEYCODE,&a)) {
65 perror("KDSETKEYCODE"); 65 perror("KDSETKEYCODE");
66 error_msg_and_die("failed to set SCANCODE %x to KEYCODE %d", sc, a.keycode); 66 bb_error_msg_and_die("failed to set SCANCODE %x to KEYCODE %d", sc, a.keycode);
67 } 67 }
68 argc -= 2; 68 argc -= 2;
69 argv += 2; 69 argv += 2;