aboutsummaryrefslogtreecommitdiff
path: root/console-tools/setkeycodes.c
diff options
context:
space:
mode:
authormjn3 <mjn3@69ca8d6d-28ef-0310-b511-8ec308f3f277>2003-03-19 09:13:01 +0000
committermjn3 <mjn3@69ca8d6d-28ef-0310-b511-8ec308f3f277>2003-03-19 09:13:01 +0000
commite901c15d890dbbdce4c086963cb1513653fc46b5 (patch)
treea318d0f03aa076c74b576ea45dc543a5669e8e91 /console-tools/setkeycodes.c
parent40758c00616c3b2c85d83eb4afdeb04b1f65c9f1 (diff)
downloadbusybox-w32-e901c15d890dbbdce4c086963cb1513653fc46b5.tar.gz
busybox-w32-e901c15d890dbbdce4c086963cb1513653fc46b5.tar.bz2
busybox-w32-e901c15d890dbbdce4c086963cb1513653fc46b5.zip
Major coreutils update.
git-svn-id: svn://busybox.net/trunk/busybox@6751 69ca8d6d-28ef-0310-b511-8ec308f3f277
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;