Dr. Werner Fink 2010-11-09 15:32:25 +00:00 committed by Git OBS Bridge
parent f5dcaca0a2
commit 4abb6d914b
2 changed files with 36 additions and 1 deletions

View File

@ -1,5 +1,5 @@
--- libconsole.c --- libconsole.c
+++ libconsole.c 2010-10-29 15:16:44.691925956 +0000 +++ libconsole.c 2010-11-09 15:24:33.895925637 +0000
@@ -707,11 +707,12 @@ static void parselog(unsigned char *buf, @@ -707,11 +707,12 @@ static void parselog(unsigned char *buf,
static void copylog(const unsigned char *buf, const size_t s) static void copylog(const unsigned char *buf, const size_t s)
{ {
@ -25,3 +25,33 @@
warn("can not open named fifo %s: %s\n", fifo_name, strerror(errno)); warn("can not open named fifo %s: %s\n", fifo_name, strerror(errno));
} }
} }
@@ -1266,7 +1267,7 @@ char * fetchtty(const pid_t pid, const p
while ((fscanf(fc, "%*s %*s (%[^)]) %d:%d", &fbuf[0], &maj, &min) == 3)) {
if (!strchr(fbuf, 'E'))
continue;
- if (strchr(fbuf, '*')) {
+ if (strchr(fbuf, 'C')) {
dev = makedev(maj, min);
break;
}
@@ -1347,7 +1348,7 @@ void secondtty(struct console *restrict
if (!strchr(fbuf, 'E'))
continue;
- if (strchr(fbuf, '*'))
+ if (strchr(fbuf, 'C'))
continue;
dev = makedev(maj, min);
--- showconsole.8
+++ showconsole.8 2010-11-09 15:26:29.038362757 +0000
@@ -22,8 +22,7 @@ Setconsole \- redirect system console ou
.SH DESCRIPTION
.B showconsole
determines the real character device of
-the current
-.BR stdin.
+the current system console.
This can be used on
.I /dev/console
as current character device to

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Nov 9 16:30:56 CET 2010 - werner@suse.de
- Change showconsole to use newest /proc/tty/consoles API
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Oct 29 17:20:56 CEST 2010 - werner@suse.de Fri Oct 29 17:20:56 CEST 2010 - werner@suse.de