summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Cameron <Brian.Cameron@sun.com>2008-02-25 15:11:02 -0500
committerWilliam Jon McCann <jmccann@redhat.com>2008-02-25 15:11:02 -0500
commitf993c1d8970e3aae7de7dea6e1ae5c6d325865b2 (patch)
tree4c61b91fd999ea49b60299260ee07a66bc516f1b
parentf39d3756e1d9da62de923ba470d3312b89bea6be (diff)
fix display of active vt when vt is disabled
This fixes the Active device so it is set to "/dev/console" when not using VT. Without this patch, the syslog reports messages like: Active device: /dev/vt/3508388860 Which is obviously wrong if not using VT at all.
-rw-r--r--src/ck-sysdeps-solaris.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ck-sysdeps-solaris.c b/src/ck-sysdeps-solaris.c
index 3f71c6d..7e2a59f 100644
--- a/src/ck-sysdeps-solaris.c
+++ b/src/ck-sysdeps-solaris.c
@@ -471,8 +471,12 @@ ck_get_active_console_num (int console_fd,
*num = active;
}
#else
- res = ERROR;
- errno = ENOTSUP;
+ /*
+ * If not using VT, not really an active number, but return 1,
+ * which maps to "/dev/console".
+ */
+ ret = TRUE;
+ *num = 1;
#endif
return ret;