From 600a9c0d2b74b113fe032ff15e77f0bd4790125b Mon Sep 17 00:00:00 2001 From: Yousong Zhou Date: Tue, 23 Jul 2013 16:28:41 +0800 Subject: Error and return when failing stat('/dev/console'). Since mkdev("*", 0600) has been called in early_dev just before early_console, no need to try checking it again. Signed-off-by: Yousong Zhou --- early.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/early.c b/early.c index f9e3277..e86e4dd 100644 --- a/early.c +++ b/early.c @@ -49,8 +49,10 @@ static void early_console(const char *dev) struct stat s; int dd; - if (stat(dev, &s)) - mkdev("*console", 0600); + if (stat(dev, &s)) { + ERROR("Failed to stat %s\n", dev); + return; + } dd = open(dev, O_RDWR); if (dd < 0) { -- cgit v1.2.3