add and use xopen_nonblocking (-18b)
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
committed by
Denys Vlasenko
parent
ca254490d7
commit
a48308701a
@@ -25,7 +25,7 @@ int kbd_mode_main(int argc UNUSED_PARAM, char **argv)
|
||||
const char *tty_name = CURRENT_TTY;
|
||||
|
||||
opt = getopt32(argv, "sakuC:", &tty_name);
|
||||
fd = xopen(tty_name, O_NONBLOCK);
|
||||
fd = xopen_nonblocking(tty_name);
|
||||
opt &= 0xf; /* clear -C bit, see (*) */
|
||||
|
||||
if (!opt) { /* print current setting */
|
||||
|
||||
@@ -277,7 +277,7 @@ int setfont_main(int argc UNUSED_PARAM, char **argv)
|
||||
opts = getopt32(argv, "m:C:", &mapfilename, &tty_name);
|
||||
argv += optind;
|
||||
|
||||
fd = xopen(tty_name, O_NONBLOCK);
|
||||
fd = xopen_nonblocking(tty_name);
|
||||
|
||||
if (sizeof(CONFIG_DEFAULT_SETFONT_DIR) > 1) { // if not ""
|
||||
if (*argv[0] != '/') {
|
||||
|
||||
@@ -36,7 +36,7 @@ int loadkmap_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
|
||||
fd = get_console_fd_or_die();
|
||||
/* or maybe:
|
||||
opt = getopt32(argv, "C:", &tty_name);
|
||||
fd = xopen(tty_name, O_NONBLOCK);
|
||||
fd = xopen_nonblocking(tty_name);
|
||||
*/
|
||||
|
||||
xread(STDIN_FILENO, flags, 7);
|
||||
|
||||
Reference in New Issue
Block a user