summaryrefslogtreecommitdiffstats
path: root/src/ck-vt-monitor.c
diff options
context:
space:
mode:
authorWilliam Jon McCann <mccann@jhu.edu>2007-02-19 17:59:54 -0500
committerWilliam Jon McCann <mccann@jhu.edu>2007-02-19 17:59:54 -0500
commit7f7124d4f7583347043b271472e570614d975f35 (patch)
treea265ba0eaccd36a5e22672ef2bed1d820e72430c /src/ck-vt-monitor.c
parent5376650940e9018a0d3e97367d2979f90af749bc (diff)
limit the use of errno
Try to limit the use of errno in case it can change.
Diffstat (limited to 'src/ck-vt-monitor.c')
-rw-r--r--src/ck-vt-monitor.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/ck-vt-monitor.c b/src/ck-vt-monitor.c
index 702ac00..1bb9f52 100644
--- a/src/ck-vt-monitor.c
+++ b/src/ck-vt-monitor.c
@@ -286,20 +286,23 @@ vt_thread_start (ThreadData *data)
ck_debug ("VT_WAITACTIVE for vt %d returned %d", num, ret);
if (ret == ERROR) {
+ const char *errmsg;
+
+ errmsg = g_strerror (errno);
if (errno == EINTR) {
ck_debug ("Interrupted waiting for native console %d activation: %s",
num,
- g_strerror (errno));
+ errmsg);
goto again;
} else {
ck_debug ("Error waiting for native console %d activation: %s",
num,
- g_strerror (errno));
+ errmsg);
g_warning ("Error waiting for native console %d activation: %s",
num,
- g_strerror (errno));
+ errmsg);
}
g_free (data);
@@ -445,8 +448,10 @@ ck_vt_monitor_init (CkVtMonitor *vt_monitor)
vt_monitor->priv->vfd = fd;
if (fd == ERROR) {
- ck_debug ("Unable to open console: %s", g_strerror (errno));
- g_warning ("Unable to open console: %s", g_strerror (errno));
+ const char *errmsg;
+ errmsg = g_strerror (errno);
+ ck_debug ("Unable to open a console: %s", errmsg);
+ g_warning ("Unable to open a console: %s", errmsg);
} else {
vt_monitor->priv->event_queue = g_async_queue_new ();
vt_monitor->priv->vt_thread_hash = g_hash_table_new (g_direct_hash, g_direct_equal);