summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko2017-08-06 12:23:04 +0200
committerDenys Vlasenko2017-08-06 12:23:04 +0200
commitae17ba0924c9c0020a6455020e7841a12bd738d4 (patch)
treece67890203fef112b216d3492c75ae4197488bb0
parent32b60cc0db90e517399ca9fa73a8ac1140db810d (diff)
downloadbusybox-ae17ba0924c9c0020a6455020e7841a12bd738d4.zip
busybox-ae17ba0924c9c0020a6455020e7841a12bd738d4.tar.gz
kbd_more: make it NOEXEC, remove redundant opt clearing
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--console-tools/kbd_mode.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/console-tools/kbd_mode.c b/console-tools/kbd_mode.c
index b0b5946..f16449d 100644
--- a/console-tools/kbd_mode.c
+++ b/console-tools/kbd_mode.c
@@ -15,7 +15,7 @@
//config: help
//config: This program reports and sets keyboard mode.
-//applet:IF_KBD_MODE(APPLET(kbd_mode, BB_DIR_BIN, BB_SUID_DROP))
+//applet:IF_KBD_MODE(APPLET_NOEXEC(kbd_mode, kbd_mode, BB_DIR_BIN, BB_SUID_DROP, kbd_mode))
//kbuild:lib-$(CONFIG_KBD_MODE) += kbd_mode.o
@@ -27,7 +27,7 @@
//usage: "\n -k Medium-raw (keycode)"
//usage: "\n -s Raw (scancode)"
//usage: "\n -u Unicode (utf-8)"
-//usage: "\n -C TTY Affect TTY instead of /dev/tty"
+//usage: "\n -C TTY Affect TTY"
#include "libbb.h"
#include <linux/kd.h>
@@ -84,7 +84,6 @@ int kbd_mode_main(int argc UNUSED_PARAM, char **argv)
* #define K_OFF 0x04
* (looks like "-ak" together would cause the same effect as -u)
*/
- opt &= 0xf; /* clear -C bit */
opt = opt & UNICODE ? 3 : opt >> 1;
/* double cast prevents warnings about widening conversion */
xioctl(fd, KDSKBMODE, (void*)(ptrdiff_t)opt);