summaryrefslogtreecommitdiffstats
path: root/loader2
diff options
context:
space:
mode:
authorPaul Nasrat <pnasrat@redhat.com>2004-12-16 16:39:41 +0000
committerPaul Nasrat <pnasrat@redhat.com>2004-12-16 16:39:41 +0000
commit5daca7a69c7e2340a778e16fb1c1b515f069a13b (patch)
treef5ccfc626d57e27144b51b766f4a476d07ac55c1 /loader2
parente40995fd104d43ff0277a18076bf77a829c5c58b (diff)
downloadanaconda-5daca7a69c7e2340a778e16fb1c1b515f069a13b.tar.gz
anaconda-5daca7a69c7e2340a778e16fb1c1b515f069a13b.tar.xz
anaconda-5daca7a69c7e2340a778e16fb1c1b515f069a13b.zip
Extra checking to distinguish hvsi consoles #134397
Diffstat (limited to 'loader2')
-rw-r--r--loader2/init.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/loader2/init.c b/loader2/init.c
index a2a5baa49..495bfe65d 100644
--- a/loader2/init.c
+++ b/loader2/init.c
@@ -531,11 +531,19 @@ int main(int argc, char **argv) {
"/dev/hvsi0", "/dev/hvsi1",
"/dev/hvsi2", /* hvsi for POWER5 */
NULL };
+ static struct termios orig_cmode;
struct termios cmode, mode;
int cfd;
cfd = open("/dev/console", O_RDONLY);
- tcgetattr(cfd,&cmode);
+ tcgetattr(cfd,&orig_cmode);
+ close(cfd);
+
+ cmode = orig_cmode;
+ cmode.c_lflag &= (~ECHO);
+
+ cfd = open("/dev/console", O_WRONLY);
+ tcsetattr(cfd,TCSANOW,&cmode);
close(cfd);
#elif defined (__ia64__)
@@ -546,6 +554,9 @@ int main(int argc, char **argv) {
for (i = 0; consoles[i] != NULL; i++) {
#if defined(__powerpc__)
if ((fd = open(consoles[i], O_RDWR)) >= 0 && !tcgetattr(fd, &mode) && !termcmp(&cmode, &mode)) {
+ cfd = open("/dev/console", O_WRONLY);
+ tcsetattr(cfd,TCSANOW,&orig_cmode);
+ close(cfd);
#else
if ((fd = open(consoles[i], O_RDWR)) >= 0) {
#endif