aboutsummaryrefslogtreecommitdiffstats
path: root/fbi.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2016-03-24 09:27:36 +0100
committerGerd Hoffmann <kraxel@redhat.com>2016-03-24 09:27:36 +0100
commit3adf7678254af8b8bc475654596105e3af763d68 (patch)
tree601b08aab9a003a3fc825d8d4a4cabcd64d0fef1 /fbi.c
parent3655da117134ca0cce8dc58bc08ec23c5ebb4ec7 (diff)
downloadfbida-3adf7678254af8b8bc475654596105e3af763d68.tar.gz
tty is stdin
Diffstat (limited to 'fbi.c')
-rw-r--r--fbi.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fbi.c b/fbi.c
index dd73858..54aec30 100644
--- a/fbi.c
+++ b/fbi.c
@@ -574,22 +574,22 @@ tty_raw(void)
{
struct termios tattr;
- fcntl(0,F_GETFL,&saved_fl);
+ fcntl(STDIN_FILENO, F_GETFL, &saved_fl);
tcgetattr (0, &saved_attributes);
- fcntl(0,F_SETFL,O_NONBLOCK);
+ fcntl(STDIN_FILENO, F_SETFL, O_NONBLOCK);
memcpy(&tattr,&saved_attributes,sizeof(struct termios));
tattr.c_lflag &= ~(ICANON|ECHO);
tattr.c_cc[VMIN] = 1;
tattr.c_cc[VTIME] = 0;
- tcsetattr (0, TCSAFLUSH, &tattr);
+ tcsetattr(STDIN_FILENO, TCSAFLUSH, &tattr);
}
static void
tty_restore(void)
{
- fcntl(0,F_SETFL,saved_fl);
- tcsetattr (0, TCSANOW, &saved_attributes);
+ fcntl(STDIN_FILENO, F_SETFL, saved_fl);
+ tcsetattr(STDIN_FILENO, TCSANOW, &saved_attributes);
}
/* testing: find key codes */
@@ -1512,7 +1512,7 @@ int main(int argc, char *argv[])
cfg_get_str(O_VIDEO_MODE),
GET_VT());
exit_signals_init();
- console_switch_init(gfx->tty_fd, console_switch_redraw);
+ console_switch_init(console_switch_redraw);
shadow_init(gfx);
signal(SIGTSTP,SIG_IGN);