Dr. Werner Fink 2011-03-11 16:57:09 +00:00 committed by Git OBS Bridge
parent 5610a174d0
commit 4646688d94
2 changed files with 29 additions and 4 deletions

View File

@ -1,5 +1,5 @@
--- makeboot.c --- makeboot.c
+++ makeboot.c 2010-10-12 16:42:53.996426160 +0000 +++ makeboot.c 2010-10-12 16:42:54.000000000 +0000
@@ -407,6 +407,7 @@ void check_run_files(const char *action, @@ -407,6 +407,7 @@ void check_run_files(const char *action,
*/ */
#ifndef USE_BLOGD #ifndef USE_BLOGD
@ -9,7 +9,7 @@
/* /*
--- proc.c --- proc.c
+++ proc.c 2010-09-30 12:19:16.000000000 +0000 +++ proc.c 2011-03-11 16:00:04.491925980 +0000
@@ -94,3 +94,74 @@ int read_proc(unsigned long int * const @@ -94,3 +94,74 @@ int read_proc(unsigned long int * const
return 0; return 0;
} }
@ -50,7 +50,7 @@
+void detect_consoles(void) +void detect_consoles(void)
+{ +{
+ FILE *fc; + FILE *fc;
+ if ((fc = fopen("/proc/tty/consoles", "r"))) { + if ((fc = fopen("/proc/consoles", "r"))) {
+ char fbuf[16]; + char fbuf[16];
+ int maj, min; + int maj, min;
+ DIR *dir; + DIR *dir;
@ -94,7 +94,7 @@
-extern void unraw_consoles(void); -extern void unraw_consoles(void);
-extern void raw_consoles(void); -extern void raw_consoles(void);
--- startpar.c --- startpar.c
+++ startpar.c 2010-10-12 16:45:32.040429641 +0000 +++ startpar.c 2011-03-11 15:59:16.388425553 +0000
@@ -52,6 +52,12 @@ @@ -52,6 +52,12 @@
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
@ -164,6 +164,15 @@
if (setpgid(0, 0)) if (setpgid(0, 0))
perror("setpgid"); perror("setpgid");
@@ -486,7 +481,7 @@ void run(struct prg *p)
_exit(1);
}
TEMP_FAILURE_RETRY(dup2(1, 2));
- if (tcsetattr(1, TCSANOW, &tio))
+ if (tcsetattr(1, TCSANOW, &tio) && errno != ENOTTY)
perror("tcsetattr");
if (wzok)
ioctl(1, TIOCSWINSZ, &wz);
@@ -582,14 +577,7 @@ int run_single(const char *prg, const ch @@ -582,14 +577,7 @@ int run_single(const char *prg, const ch
{ {
sigset_t nmask; sigset_t nmask;
@ -244,3 +253,13 @@
(void)sigemptyset(&nmask); (void)sigemptyset(&nmask);
(void)sigaddset(&nmask, SIGHUP); (void)sigaddset(&nmask, SIGHUP);
sigprocmask(SIG_UNBLOCK, &nmask, NULL); sigprocmask(SIG_UNBLOCK, &nmask, NULL);
@@ -1015,7 +1021,8 @@ int main(int argc, char **argv)
if (tcgetattr(0, &tio))
{
- perror("tcgetattr");
+ if (errno != ENOTTY)
+ perror("tcgetattr");
tcgetattr(2, &tio);
}
cfmakeraw(&tio);

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Mar 11 17:05:55 CET 2011 - werner@suse.de
- startpar: fix location of consoles under /proc
- startpar: ignore errors from system console not being a tty
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Mar 10 15:15:33 CET 2011 - werner@suse.de Thu Mar 10 15:15:33 CET 2011 - werner@suse.de