summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-02-05 18:27:43 +0100
committerLennart Poettering <lennart@poettering.net>2014-02-05 18:27:43 +0100
commitd9eb81f9844f6d28b52e44b2c0e6e280a61d8200 (patch)
treeb9b0424b830b7e966cb285220c8cab87f38cb33b
parent1baccdda2e954214e0c5463d6ed8f06009b33c41 (diff)
logind: add new "wayland" session type
-rw-r--r--src/login/logind-session.c7
-rw-r--r--src/login/logind-session.h1
2 files changed, 5 insertions, 3 deletions
diff --git a/src/login/logind-session.c b/src/login/logind-session.c
index ff0a7a4f2e..4f3259ca7c 100644
--- a/src/login/logind-session.c
+++ b/src/login/logind-session.c
@@ -520,7 +520,7 @@ int session_start(Session *s) {
if (r < 0)
return r;
- log_struct(s->type == SESSION_TTY || s->type == SESSION_X11 ? LOG_INFO : LOG_DEBUG,
+ log_struct(s->class == SESSION_BACKGROUND ? LOG_DEBUG : LOG_INFO,
MESSAGE_ID(SD_MESSAGE_SESSION_START),
"SESSION_ID=%s", s->id,
"USER_ID=%s", s->user->name,
@@ -605,7 +605,7 @@ int session_finalize(Session *s) {
return -ESTALE;
if (s->started)
- log_struct(s->type == SESSION_TTY || s->type == SESSION_X11 ? LOG_INFO : LOG_DEBUG,
+ log_struct(s->class == SESSION_BACKGROUND ? LOG_DEBUG : LOG_INFO,
MESSAGE_ID(SD_MESSAGE_SESSION_STOP),
"SESSION_ID=%s", s->id,
"USER_ID=%s", s->user->name,
@@ -1077,7 +1077,8 @@ DEFINE_STRING_TABLE_LOOKUP(session_state, SessionState);
static const char* const session_type_table[_SESSION_TYPE_MAX] = {
[SESSION_TTY] = "tty",
[SESSION_X11] = "x11",
- [SESSION_UNSPECIFIED] = "unspecified"
+ [SESSION_WAYLAND] = "wayland",
+ [SESSION_UNSPECIFIED] = "unspecified",
};
DEFINE_STRING_TABLE_LOOKUP(session_type, SessionType);
diff --git a/src/login/logind-session.h b/src/login/logind-session.h
index d724e20e7f..202d28752f 100644
--- a/src/login/logind-session.h
+++ b/src/login/logind-session.h
@@ -54,6 +54,7 @@ typedef enum SessionType {
SESSION_UNSPECIFIED,
SESSION_TTY,
SESSION_X11,
+ SESSION_WAYLAND,
_SESSION_TYPE_MAX,
_SESSION_TYPE_INVALID = -1
} SessionType;