diff options
author | William Jon McCann <mccann@jhu.edu> | 2007-08-21 11:27:04 -0400 |
---|---|---|
committer | William Jon McCann <mccann@jhu.edu> | 2007-08-21 11:27:04 -0400 |
commit | 0145691112f14352ef15b49c1ea3079a8e80f6e8 (patch) | |
tree | ba3477be1e65fb3b6069cadbf3bb9e1a1fe2fe0a /src/ck-vt-monitor.c | |
parent | 3e6bbcaea6d441956c9c1173d7586bd346a8c77b (diff) |
more solaris support
based on patch from Brian Cameron.
Diffstat (limited to 'src/ck-vt-monitor.c')
-rw-r--r-- | src/ck-vt-monitor.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/ck-vt-monitor.c b/src/ck-vt-monitor.c index 4291bdd..5c37a64 100644 --- a/src/ck-vt-monitor.c +++ b/src/ck-vt-monitor.c @@ -29,11 +29,6 @@ #include <sys/ioctl.h> #include <sys/vt.h> -#if defined (__linux__) -#include <linux/tty.h> -#include <linux/kd.h> -#endif /* linux */ - #include <glib.h> #include <glib/gi18n.h> #include <glib/gstdio.h> @@ -358,6 +353,7 @@ vt_add_watch_unlocked (CkVtMonitor *vt_monitor, static void vt_add_watches (CkVtMonitor *vt_monitor) { + guint max_consoles; int i; gint32 current_num; @@ -365,7 +361,13 @@ vt_add_watches (CkVtMonitor *vt_monitor) current_num = vt_monitor->priv->active_num; - for (i = 1; i < MAX_NR_CONSOLES; i++) { + max_consoles = 1; + + if (! ck_get_max_num_consoles (&max_consoles)) { + /* FIXME: this can fail on solaris */ + } + + for (i = 1; i < max_consoles; i++) { gpointer id; /* don't wait on the active vc */ |