Dr. Werner Fink 2011-03-31 15:11:27 +00:00 committed by Git OBS Bridge
parent acd854e641
commit cec26d957a
4 changed files with 1387 additions and 5 deletions

View File

@ -1,4 +1,76 @@
--- .dummy
+++ .dummy 2011-03-25 17:58:16.867926297 +0000
@@ -0,0 +1 @@
+Remove if real patch is required
--- blogd.c
+++ blogd.c 2011-03-31 14:59:37.543926064 +0000
@@ -336,7 +336,7 @@ int main(int argc, char *argv[])
dup2(0, 2);
secondtty(cons, st.st_rdev);
-exit(0);
+
(void)ioctl(0, TIOCCONS, NULL); /* Undo any current map if any */
close(0);
@@ -351,22 +351,34 @@ exit(0);
#endif
c->max_canon = _POSIX_MAX_CANON;
c->tlock = 0;
- if (tcgetattr(cons->fd, &cons->otio) < 0)
+ if (tcgetattr(c->fd, &c->otio) < 0)
continue;
c->tlock = 1;
-#if 1
+
iflag = c->otio.c_iflag;
oflag = c->otio.c_oflag;
- c->otio.c_iflag |= (ICRNL | IGNBRK);
- c->otio.c_iflag &= ~(INLCR | IGNCR | BRKINT);
- c->otio.c_oflag |= (ONLCR | OPOST);
- c->otio.c_oflag &= ~(OCRNL | ONLRET);
- (void)tcsetattr(cons->fd, TCSADRAIN, &cons->otio);
+ if (ioctl(c->fd, TIOCMGET, &flags) == 0) {
+ ispeed = cfgetispeed(&c->otio);
+ ospeed = cfgetospeed(&c->otio);
+
+ c->otio.c_iflag = c->otio.c_lflag = 0;
+ c->otio.c_oflag = (ONLCR | OPOST);
+ c->otio.c_cflag = CREAD | CS8 | HUPCL | (c->otio.c_cflag & CLOCAL);
+
+ cfsetispeed(&c->otio, ispeed);
+ cfsetospeed(&c->otio, ospeed);
+ } else {
+ c->otio.c_iflag |= (ICRNL | IGNBRK);
+ c->otio.c_iflag &= ~(INLCR | IGNCR | BRKINT);
+ c->otio.c_oflag |= (ONLCR | OPOST);
+ c->otio.c_oflag &= ~(OCRNL | ONLRET);
+ }
+ (void)tcsetattr(c->fd, TCSADRAIN, &c->otio);
c->otio.c_iflag = iflag;
c->otio.c_oflag = oflag;
-#endif
+
if ((c->otio.c_lflag & ICANON) == 0) {
c->otio.c_lflag |= ICANON | IEXTEN | ISIG | ECHO|ECHOE|ECHOK|ECHOKE;
c->otio.c_oflag |= OPOST;
--- libconsole.c
+++ libconsole.c 2011-03-31 14:44:34.988426227 +0000
@@ -302,7 +302,7 @@ out:
/*
* The stdio file pointer for our log file
*/
-struct console *restrict cons;
+struct console *cons;
static FILE * flog = NULL;
static int fdread = -1;
static int fdfifo = -1;
@@ -1463,6 +1463,10 @@ static void consalloc(struct console *re
return;
}
tail->next = newc;
+ tail->tlock = 0;
+ tail->max_canon = _POSIX_MAX_CANON;
+ memset(&tail->ltio, 0, sizeof(tail->ltio));
+ memset(&tail->otio, 0, sizeof(tail->otio));
tail = tail->next;
if ((flags = fcntl(newc->fd, F_GETFL)) < 0)

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,11 @@
-------------------------------------------------------------------
------------------------------------------------------------------
Thu Mar 31 16:14:55 CEST 2011 - werner@suse.de
- Remove debug code from showconsole/blogd
- Make serial console tc init work even with blogd
- sulogin: add support for multiple console devices
------------------------------------------------------------------
Fri Mar 25 18:59:05 CET 2011 - werner@suse.de
- New showconsole verion 1.14

View File

@ -49,6 +49,7 @@ Patch1: sysvinit-2.82-startstop.patch
Patch2: sysvinit-2.88dsf-suse.patch
Patch3: sysvinit-2.88dsf-no-kill.patch
Patch4: notify-pam-dead.patch
Patch5: sysvinit-2.88dsf-multiple-sulogin.patch
Patch20: powerd-2.0.2.dif
Patch21: powerd-2.0.2-getaddrinfo.patch
Patch30: killproc-2.19.dif
@ -89,6 +90,7 @@ sysvinit package.
%patch2 -p0 -b .suse
%patch3 -p0 -b .no-kill
%patch4 -p0 -b .pam
%patch5 -p0 -b .sulogin
%patch
pushd ../powerd-%{PDVER}
%patch20