projects
/
oweals
/
busybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gz_open and gz_close were left in, even when BB_FEATURE_TAR_GZIP was disabled.
[oweals/busybox.git]
/
loadkmap.c
diff --git
a/loadkmap.c
b/loadkmap.c
index 43c1cc795ef813472f5135ce697793c67c04b715..dcb5c1caa1ef2e4b6b3772018df441d1fe948fbb 100644
(file)
--- a/
loadkmap.c
+++ b/
loadkmap.c
@@
-20,11
+20,14
@@
*
*/
*
*/
-#include "busybox.h"
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/ioctl.h>
+#include "busybox.h"
#define BINARY_KEYMAP_MAGIC "bkeymap"
#define BINARY_KEYMAP_MAGIC "bkeymap"
@@
-48,7
+51,7
@@
int loadkmap_main(int argc, char **argv)
char flags[MAX_NR_KEYMAPS], buff[7];
if (argc != 1)
char flags[MAX_NR_KEYMAPS], buff[7];
if (argc != 1)
-
usage(loadkmap_usage
);
+
show_usage(
);
fd = open("/dev/tty0", O_RDWR);
if (fd < 0)
fd = open("/dev/tty0", O_RDWR);
if (fd < 0)
@@
-56,7
+59,7
@@
int loadkmap_main(int argc, char **argv)
read(0, buff, 7);
if (0 != strncmp(buff, BINARY_KEYMAP_MAGIC, 7))
read(0, buff, 7);
if (0 != strncmp(buff, BINARY_KEYMAP_MAGIC, 7))
- error_msg_and_die("This is not a valid binary keymap.
\n
");
+ error_msg_and_die("This is not a valid binary keymap.");
if (MAX_NR_KEYMAPS != read(0, flags, MAX_NR_KEYMAPS))
perror_msg_and_die("Error reading keymap flags");
if (MAX_NR_KEYMAPS != read(0, flags, MAX_NR_KEYMAPS))
perror_msg_and_die("Error reading keymap flags");