summaryrefslogtreecommitdiff
path: root/src/wayland/meta-tty.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/wayland/meta-tty.c')
-rw-r--r--src/wayland/meta-tty.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/wayland/meta-tty.c b/src/wayland/meta-tty.c
index 82967fe68..31a63598b 100644
--- a/src/wayland/meta-tty.c
+++ b/src/wayland/meta-tty.c
@@ -157,12 +157,19 @@ try_open_vt (MetaTTY *tty,
return fd;
}
-/* FIXME? */
-static int
-tty_activate_vt (MetaTTY *tty,
- int vt)
+gboolean
+meta_tty_activate_vt (MetaTTY *tty,
+ int vt,
+ GError **error)
{
- return ioctl(tty->fd, VT_ACTIVATE, vt);
+ if (ioctl(tty->fd, VT_ACTIVATE, vt) < 0)
+ {
+ g_set_error (error, G_IO_ERROR, g_io_error_from_errno (errno),
+ strerror (errno));
+ return FALSE;
+ }
+ else
+ return TRUE;
}
static int