From: Karel Zak Date: Fri, 9 Nov 2012 11:52:33 +0000 (+0100) Subject: lib/consoles: try another methods before go to fallback X-Git-Tag: v2.23-rc1~540 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27a76b7bd057c6683c5ee100f0d4e3109cc8675d;p=thirdparty%2Futil-linux.git lib/consoles: try another methods before go to fallback The current code goes immediately to the fallback section if any detection method fails. It seems better to try another methods before the fallback solution. Signed-off-by: Karel Zak --- diff --git a/lib/consoles.c b/lib/consoles.c index 11b7d738d4..a0faa69209 100644 --- a/lib/consoles.c +++ b/lib/consoles.c @@ -598,8 +598,6 @@ console: return reconnect; /* success */ if (rc < 0) return rc; /* fatal error */ - if (rc == 1) - goto fallback; /* detection error */ /* * Detection of devices used for Linux system console using @@ -610,8 +608,6 @@ console: return reconnect; /* success */ if (rc < 0) return rc; /* fatal error */ - if (rc == 1) - goto fallback; /* detection error */ /* * Detection of devices used for Linux system console using @@ -622,8 +618,6 @@ console: return reconnect; /* success */ if (rc < 0) return rc; /* fatal error */ - if (rc == 1) - goto fallback; /* detection error */ /* * Detection of the device used for Linux system console using @@ -634,11 +628,11 @@ console: return reconnect; /* success */ if (rc < 0) return rc; /* fatal error */ - if (rc == 1) - goto fallback; /* detection error */ - DBG(dbgprint("detection success [rc=%d]", reconnect)); - return reconnect; + if (*consoles) { + DBG(dbgprint("detection success [rc=%d]", reconnect)); + return reconnect; + } #endif /* __linux __ */