[mutter/wayland] mutter-launch: adapt to systemd API change
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wayland] mutter-launch: adapt to systemd API change
- Date: Wed, 11 Sep 2013 18:37:27 +0000 (UTC)
commit 2f9c6c4146bc905c82bd4c041999dccdf37413d1
Author: Giovanni Campagna <gcampagn redhat com>
Date: Wed Sep 11 18:49:47 2013 +0200
mutter-launch: adapt to systemd API change
The API was changed during the patch review.
(Yes, we were depending on API which was sitting in a patch not
yet reviewed... you know, vertical integration!)
https://bugzilla.gnome.org/show_bug.cgi?id=707929
src/wayland/weston-launch.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/wayland/weston-launch.c b/src/wayland/weston-launch.c
index 917c429..79068e0 100644
--- a/src/wayland/weston-launch.c
+++ b/src/wayland/weston-launch.c
@@ -571,6 +571,8 @@ setup_tty(struct weston_launch *wl)
free(tty);
#ifdef HAVE_SD_SESSION_GET_VT
} else if (ok == -ENOENT) {
+ unsigned vt;
+
/* Negative errnos are cool, right?
So cool that we can't distinguish "session not found"
from "key does not exist in the session file"!
@@ -578,11 +580,11 @@ setup_tty(struct weston_launch *wl)
from sd_pid_get_session()...
*/
- ok = sd_session_get_vt(session, &tty);
+ ok = sd_session_get_vt(session, &vt);
if (ok < 0)
error(1, -ok, "could not determine current TTY");
- snprintf(path, PATH_MAX, "/dev/tty%s", tty);
+ snprintf(path, PATH_MAX, "/dev/tty%u", vt);
wl->tty = open(path, O_RDWR | O_NOCTTY | O_CLOEXEC);
free(tty);
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]