The factory-reset action is handled together with the various
sleep/shutdown actions, but its not either one.
Fixes #39385
assert(m);
assert(a);
+
+ /* Only sleep/shutdown actions emit a signal */
+ if (a->inhibit_what < 0)
+ return 0;
+
assert(IN_SET(a->inhibit_what, INHIBIT_SHUTDOWN, INHIBIT_SLEEP));
/* We need to send both old and new signal for backward compatibility. The newer one allows clients
delayed =
m->inhibit_delay_max > 0 &&
+ a->inhibit_what >= 0 &&
manager_is_inhibited(m, a->inhibit_what, NULL, MANAGER_IS_INHIBITED_CHECK_DELAY, UID_INVALID, NULL);
if (delayed)