Add support for devfs device names.

This commit is contained in:
Matt Kraai
2001-07-23 14:52:08 +00:00
parent 0139ca92ff
commit 439e3df653
17 changed files with 102 additions and 58 deletions

View File

@@ -51,9 +51,9 @@ int dumpkmap_main(int argc, char **argv)
show_usage();
}
fd = open("/dev/tty0", O_RDWR);
fd = open(CURRENT_VC, O_RDWR);
if (fd < 0) {
perror_msg("Error opening /dev/tty0");
perror_msg("Error opening " CURRENT_VC);
return EXIT_FAILURE;
}

View File

@@ -37,9 +37,9 @@ int loadacm_main(int argc, char **argv)
show_usage();
}
fd = open("/dev/tty", O_RDWR);
fd = open(CURRENT_VC, O_RDWR);
if (fd < 0) {
perror_msg_and_die("Error opening /dev/tty1");
perror_msg_and_die("Error opening " CURRENT_VC);
}
if (screen_map_load(fd, stdin)) {

View File

@@ -46,9 +46,9 @@ extern int loadfont_main(int argc, char **argv)
if (argc != 1)
show_usage();
fd = open("/dev/tty0", O_RDWR);
fd = open(CURRENT_VC, O_RDWR);
if (fd < 0)
perror_msg_and_die("Error opening /dev/tty0");
perror_msg_and_die("Error opening " CURRENT_VC);
loadnewfont(fd);
return EXIT_SUCCESS;

View File

@@ -53,9 +53,9 @@ int loadkmap_main(int argc, char **argv)
if (argc != 1)
show_usage();
fd = open("/dev/tty0", O_RDWR);
fd = open(CURRENT_VC, O_RDWR);
if (fd < 0)
perror_msg_and_die("Error opening /dev/tty0");
perror_msg_and_die("Error opening " CURRENT_VC);
read(0, buff, 7);
if (0 != strncmp(buff, BINARY_KEYMAP_MAGIC, 7))