Dr. Werner Fink 2014-02-07 15:47:55 +00:00 committed by Git OBS Bridge
parent d29e5b764d
commit 2c356b3999
3 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,24 @@
--- src/consoles.c
+++ src/consoles.c 2014-02-07 15:33:15.786235493 +0000
@@ -313,16 +313,19 @@ console:
*/
if ((fc = fopen("/proc/consoles", "re"))) {
char fbuf[16];
- int maj, min;
+ int maj, min, matches;
DIR *dir;
dir = opendir("/dev");
if (!dir) {
fclose(fc);
goto fallback;
}
- while ((fscanf(fc, "%*s %*s (%[^)]) %d:%d", &fbuf[0], &maj, &min) == 3)) {
+ while ((matches = fscanf(fc, "%*s %*s (%[^)]) %d:%d", &fbuf[0], &maj, &min)) >= 1) {
char * name;
+ if (matches != 3)
+ continue;
+
if (!strchr(fbuf, 'E'))
continue;
comparedev = makedev(maj, min);

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Feb 7 15:42:34 UTC 2014 - werner@suse.de
- Add patch sysvinit-2.88+dsf-xen.patch to enable sulogin to find
suitable console device even if first is not usable (bnc#862078)
-------------------------------------------------------------------
Tue Jan 14 12:31:53 UTC 2014 - werner@suse.de

View File

@ -70,6 +70,8 @@ Patch10: %{name}-%{version}dsf-env.patch
Patch11: %{name}-%{version}dsf-dostat.patch
# PATCH-FIX-UPSTREAM -- killall5: handle strange names of executables
Patch12: %{name}-%{version}dsf-sulogin.diff
# PATCH-FIX-SUSE -- sulogin: find suitable console device even if first is not usable
Patch13: %{name}-%{version}dsf-xen.patch
Patch30: killproc-%{KPVER}.dif
Patch40: showconsole-%{SCVER}.dif
Patch41: showconsole-1.16-deadlock.diff
@ -134,6 +136,7 @@ Just some symlinks and manual page for sysvinit
%patch10 -p0 -b .env
%patch11 -p0 -b .dostat
%patch12 -p0 -b .ka5
%patch13 -p0 -b .xen
%patch
pushd doc
mkdir killproc showconsole