summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Nasrat <pnasrat@redhat.com>2004-12-16 15:54:03 +0000
committerPaul Nasrat <pnasrat@redhat.com>2004-12-16 15:54:03 +0000
commit8a72813eca2c4acc8f2dba2e5aa5da88ed365b29 (patch)
treeef88083beea0f434a291eaec1446ea7be17a0b12
parent9d1aba56337ab5bb9fb651f19b38f394a7dd5bc6 (diff)
downloadanaconda-8a72813eca2c4acc8f2dba2e5aa5da88ed365b29.tar.gz
anaconda-8a72813eca2c4acc8f2dba2e5aa5da88ed365b29.tar.xz
anaconda-8a72813eca2c4acc8f2dba2e5aa5da88ed365b29.zip
Extra checking to distinguish hvsi consoles #137495
-rw-r--r--ChangeLog4
-rw-r--r--loader2/init.c13
2 files changed, 16 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index fc2ca5c71..b433ea3c9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2004-12-16 Paul Nasrat <pnasrat@localhost.localdomain>
+
+ * loader2/init.c: Extra checking to distinguish hvsi consoles #137495
+
2004-12-14 Jeremy Katz <katzj@redhat.com>
* anaconda.spec: Bump version.
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