summaryrefslogtreecommitdiff
path: root/init/init.c
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-06-21 20:57:51 +0000
committerMiles Bader <miles@gnu.org>1996-06-21 20:57:51 +0000
commit739183d118aff3fabe0bd2992dc1843b0e655f97 (patch)
treef66a9225a920c178eb629acc5d70a08ff09f808d /init/init.c
parenta13b82b1a1b785222702be6797f508f82f082b22 (diff)
(open_console): Print an error message for /dev/console failing.
Diffstat (limited to 'init/init.c')
-rw-r--r--init/init.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/init/init.c b/init/init.c
index 0ee8ef58..e26fa535 100644
--- a/init/init.c
+++ b/init/init.c
@@ -953,11 +953,11 @@ open_console ()
termname = _PATH_CONSOLE;
term = file_name_lookup (termname, O_RDWR, 0);
if (term != MACH_PORT_NULL)
- {
- err = io_stat (term, &st);
- if (err)
- error (0, err, "%s", termname);
- }
+ err = io_stat (term, &st);
+ else
+ err = errno;
+ if (err)
+ error (0, err, "%s", termname);
try = 1;
if (term == MACH_PORT_NULL || err || st.st_fstype != FSTYPE_TERM)