logind: use handle_action_to_string where appropriate

Since 138224fc80, HandleActionData
records the corresponding HandleAction. Let's use it instead of
relying on inhibit_what when mapping to string.
This commit is contained in:
Mike Yuan
2024-01-01 19:12:44 +01:00
committed by Luca Boccassi
parent 3ea26cb8b2
commit a31222b232
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -209,8 +209,8 @@ static int handle_action_execute(
if (m->delayed_action)
return log_debug_errno(SYNTHETIC_ERRNO(EALREADY),
"Action already in progress (%s), ignoring requested %s operation.",
inhibit_what_to_string(m->delayed_action->inhibit_what),
"Action %s already in progress, ignoring requested %s operation.",
handle_action_to_string(m->delayed_action->handle),
handle_action_to_string(handle));
inhibit_operation = ASSERT_PTR(handle_action_lookup(handle))->inhibit_what;
+1 -1
View File
@@ -4011,7 +4011,7 @@ int match_job_removed(sd_bus_message *message, void *userdata, sd_bus_error *err
if (m->action_job && streq(m->action_job, path)) {
assert(m->delayed_action);
log_info("Operation '%s' finished.", inhibit_what_to_string(m->delayed_action->inhibit_what));
log_info("Operation '%s' finished.", handle_action_to_string(m->delayed_action->handle));
/* Tell people that they now may take a lock again */
(void) send_prepare_for(m, m->delayed_action, false);