]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
systemctl: other wayland sessions should inhibit shutdown, like x11 sessions do ...
authorAlan Jenkins <alan.christopher.jenkins@gmail.com>
Thu, 16 Nov 2017 10:02:34 +0000 (10:02 +0000)
committerLennart Poettering <lennart@poettering.net>
Thu, 16 Nov 2017 10:02:34 +0000 (11:02 +0100)
Update systemctl code to match the manpage for sd_session_get_type().

"wayland" sessions should be treated the same as "x11".  "mir" too, fwiw.

src/systemctl/systemctl.c

index f8c8c318a3c734e99509d407ef5299a5c6b197bc..9d9b45f08adcdf1237aa97c3cafdba7319223351 100644 (file)
@@ -3417,7 +3417,7 @@ static int logind_check_inhibitors(enum action a) {
                 if (sd_session_get_class(*s, &class) < 0 || !streq(class, "user"))
                         continue;
 
-                if (sd_session_get_type(*s, &type) < 0 || !STR_IN_SET(type, "x11", "tty"))
+                if (sd_session_get_type(*s, &type) < 0 || !STR_IN_SET(type, "x11", "wayland", "tty", "mir"))
                         continue;
 
                 sd_session_get_tty(*s, &tty);