diff --git a/sulogin-does-not-find-any-console.patch b/sulogin-does-not-find-any-console.patch new file mode 100644 index 0000000..77ed85c --- /dev/null +++ b/sulogin-does-not-find-any-console.patch @@ -0,0 +1,32 @@ +Enable sulogin to find a suitable console device even if the first line +in /proc/consoles does not have any major and minor number (bnc#862078) + +--- + sulogin-consoles.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- login-utils/sulogin-consoles.c ++++ login-utils/sulogin-consoles.c 2014-02-07 15:47:14.246235487 +0000 +@@ -319,7 +319,7 @@ static int detect_consoles_from_proc(str + char fbuf[16 + 1]; + DIR *dir = NULL; + FILE *fc = NULL; +- int maj, min, rc = 1; ++ int maj, min, rc = 1, matches; + + DBG(dbgprint("trying /proc")); + +@@ -332,10 +332,12 @@ static int detect_consoles_from_proc(str + if (!dir) + goto done; + +- while (fscanf(fc, "%*s %*s (%16[^)]) %d:%d", fbuf, &maj, &min) == 3) { ++ while ((matches = fscanf(fc, "%*s %*s (%16[^)]) %d:%d", fbuf, &maj, &min)) >= 1) { + char *name; + dev_t comparedev; + ++ if (matches != 3) ++ continue; + if (!strchr(fbuf, 'E')) + continue; + comparedev = makedev(maj, min); diff --git a/util-linux.spec b/util-linux.spec index 35968f0..5179b37 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -114,6 +114,8 @@ Patch15: agetty-fooled-on-serial-line-due-plymouth.patch Patch16: agetty-on-s390-on-dev-3270-tty1-line.patch # PATCH-FIX-SUSE -- Make sure that plymouth does not break sulogin Patch17: sulogin-fooled-on-tty-line-due-plymouth.patch +# PATCH-FIX-SUSE -- sulogin: find suitable console device even if first is not usable +Patch18: sulogin-does-not-find-any-console.patch # hack for boot.localfs Patch20: util-linux-HACK-boot.localfs.diff @@ -235,6 +237,7 @@ xzcat %{S:0} | %gpg_verify %{S:12} - %patch15 -p0 %patch16 -p0 %patch17 -p0 +%patch18 -p0 # %patch20 -p1 #