summaryrefslogtreecommitdiff
path: root/src/ck-sysdeps-solaris.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ck-sysdeps-solaris.c')
-rw-r--r--src/ck-sysdeps-solaris.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/ck-sysdeps-solaris.c b/src/ck-sysdeps-solaris.c
index 335ab8b..bb37e1e 100644
--- a/src/ck-sysdeps-solaris.c
+++ b/src/ck-sysdeps-solaris.c
@@ -33,6 +33,7 @@
#ifdef HAVE_SYS_VT_H
#include <sys/vt.h>
#endif
+#include <libscf.h>
#define DEV_ENCODE(M,m) ( \
( (M&0xfff) << 8) | ( (m&0xfff00) << 12) | (m&0xff) \
@@ -419,6 +420,23 @@ ck_get_max_num_consoles (guint *num)
return ret;
}
+gboolean
+ck_supports_activatable_consoles (void)
+{
+ char *state = NULL;
+ gboolean vt_enabled;
+
+ state = smf_get_state ("svc:/system/vtdaemon:default");
+ if (state && g_str_equal (state, SCF_STATE_STRING_ONLINE)) {
+ vt_enabled = TRUE;
+ } else {
+ vt_enabled = FALSE;
+ }
+
+ g_free (state);
+ return vt_enabled;
+}
+
char *
ck_get_console_device_for_num (guint num)
{