From 27a76b7bd057c6683c5ee100f0d4e3109cc8675d Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 9 Nov 2012 12:52:33 +0100 Subject: [PATCH] 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 --- lib/consoles.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) 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 __ */ -- 2.47.3