]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
logind: use handle_action_to_string where appropriate
authorMike Yuan <me@yhndnzj.com>
Mon, 1 Jan 2024 12:08:11 +0000 (20:08 +0800)
committerLuca Boccassi <luca.boccassi@gmail.com>
Mon, 1 Jan 2024 18:12:44 +0000 (19:12 +0100)
Since 138224fc807091d31f19a3b22f066d6044626001, HandleActionData
records the corresponding HandleAction. Let's use it instead of
relying on inhibit_what when mapping to string.

src/login/logind-action.c
src/login/logind-dbus.c

index e8951073788e88753cf78ceb9a88c95ec2b70851..acef32679a1adce19aa990b23565460f17ba6274 100644 (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;
index 898c6f752b6e70434f8e6c8244d8c7b15b8fb670..b310a7cee8638ce27b074abc2aa34dfc3e9a8123 100644 (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);