diff options
author | Jeremy Katz <katzj@redhat.com> | 2004-08-25 18:38:44 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2004-08-25 18:38:44 +0000 |
commit | 5520137dd1152680293e6f0caaafc1ee80f4f1a9 (patch) | |
tree | 6bfd3983bdd70c1781e83a0dbc6443fa9fbdd6c7 /loader2/loader.c | |
parent | 2e2b9addb919dc318fbde3ebad885ebb62a2e2cd (diff) | |
download | anaconda-5520137dd1152680293e6f0caaafc1ee80f4f1a9.tar.gz anaconda-5520137dd1152680293e6f0caaafc1ee80f4f1a9.tar.xz anaconda-5520137dd1152680293e6f0caaafc1ee80f4f1a9.zip |
hack so that if we have a "weird" physical console, we don't later try to think
it's serial. also carry in the iseries checking into the loader. *sigh*
(#130906)
Diffstat (limited to 'loader2/loader.c')
-rw-r--r-- | loader2/loader.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/loader2/loader.c b/loader2/loader.c index 51a2e1a49..ce9c2600c 100644 --- a/loader2/loader.c +++ b/loader2/loader.c @@ -41,6 +41,7 @@ #include <sys/wait.h> #include <linux/fb.h> +#include <linux/serial.h> #include "loader.h" #include "loadermisc.h" /* JKFIXME: functions here should be split out */ @@ -1075,6 +1076,7 @@ static int hasGraphicalOverride() { int main(int argc, char ** argv) { int flags = LOADER_FLAGS_SELINUX; struct stat sb; + struct serial_struct si; int rc, i; char * arg; FILE *f; @@ -1097,12 +1099,15 @@ int main(int argc, char ** argv) { char * ksFile = NULL; int testing = 0; int mediacheck = 0; + int physcon = 0; poptContext optCon; struct poptOption optionTable[] = { { "cmdline", '\0', POPT_ARG_STRING, &cmdLine, 0 }, { "ksfile", '\0', POPT_ARG_STRING, &ksFile, 0 }, { "test", '\0', POPT_ARG_NONE, &testing, 0 }, { "mediacheck", '\0', POPT_ARG_NONE, &mediacheck, 0}, + /* FIXME: this is a temporary hack to work around #130906 */ + { "physconsole", '\0', POPT_ARG_NONE, &physcon, 0 }, { 0, 0, 0, 0, 0 } }; @@ -1146,8 +1151,9 @@ int main(int argc, char ** argv) { /* The fstat checks disallows serial console if we're running through a pty. This is handy for Japanese. */ fstat(0, &sb); - if (major(sb.st_rdev) != 3 && major(sb.st_rdev) != 136) { - if (ioctl (0, TIOCLINUX, &twelve) < 0) + if (major(sb.st_rdev) != 3 && major(sb.st_rdev) != 136 && (physcon != 1)){ + if ((ioctl (0, TIOCLINUX, &twelve) < 0) && + (ioctl(0, TIOCGSERIAL, &si) != -1)) flags |= LOADER_FLAGS_SERIAL; } |