From: Mike Yuan Date: Mon, 1 Jan 2024 12:08:11 +0000 (+0800) Subject: logind: use handle_action_to_string where appropriate X-Git-Tag: v256-rc1~1356 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a31222b232eb4312301b232a3f28f144ab144895;p=thirdparty%2Fsystemd.git logind: use handle_action_to_string where appropriate Since 138224fc807091d31f19a3b22f066d6044626001, HandleActionData records the corresponding HandleAction. Let's use it instead of relying on inhibit_what when mapping to string. --- diff --git a/src/login/logind-action.c b/src/login/logind-action.c index e8951073788..acef32679a1 100644 --- a/src/login/logind-action.c +++ b/src/login/logind-action.c @@ -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; diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index 898c6f752b6..b310a7cee86 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -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);