]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/login/logind-wall.c
logind: add HANDLE_ACTION_IS_SLEEP() and HANDLE_ACTION_IS_SHUTDOWN() helpers
[thirdparty/systemd.git] / src / login / logind-wall.c
index aa7352233407dc1b45b2c44ee050a23f516d217b..97b74e9e042d5b56613848fd2b7bfec3e8bf6aea 100644 (file)
@@ -52,12 +52,7 @@ bool logind_wall_tty_filter(const char *tty, bool is_local, void *userdata) {
          * can assume that if the system enters sleep or hibernation, this will be visible in an obvious way
          * for any local user. And once the systems exits sleep or hibernation, the notification would be
          * just noise, in particular for auto-suspend. */
-        if (is_local &&
-            IN_SET(m->scheduled_shutdown_action->handle,
-                   HANDLE_SUSPEND,
-                   HANDLE_HIBERNATE,
-                   HANDLE_HYBRID_SLEEP,
-                   HANDLE_SUSPEND_THEN_HIBERNATE))
+        if (is_local && HANDLE_ACTION_IS_SLEEP(m->scheduled_shutdown_action->handle))
                 return false;
 
         return !streq_ptr(p, m->scheduled_shutdown_tty);