chiark / gitweb /
logind: add new "wayland" session type
[elogind.git] / src / login / logind-session.c
index ff0a7a4f2e2253094317f1e2cba5a3d3b3636aac..4f3259ca7cd6f3edf7cfa69ab08f1cef4fd59e0d 100644 (file)
@@ -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);