]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/manager: kill unused default_unit_job_id field
authorMike Yuan <me@yhndnzj.com>
Sun, 26 Oct 2025 20:23:55 +0000 (21:23 +0100)
committerMike Yuan <me@yhndnzj.com>
Wed, 5 Nov 2025 09:39:30 +0000 (10:39 +0100)
While at it, make sure the "Queued ... job for default target"
message is always logged, i.e. also when we fall back to
start job instead of isolate.

src/core/main.c
src/core/manager.h

index 183aac53791b357133ab1507214b72fafcfd0d0f..d7651d0df988a6cdeaa68895a0aa4107877a26ca 100644 (file)
@@ -2639,12 +2639,10 @@ static int do_queue_default_job(
                 return log_struct_errno(LOG_EMERG, r,
                                         LOG_MESSAGE("Failed to isolate default target: %s", bus_error_message(&error, r)),
                                         LOG_MESSAGE_ID(SD_MESSAGE_CORE_ISOLATE_TARGET_FAILED_STR));
-        } else
-                log_info("Queued %s job for default target %s.",
-                         job_type_to_string(job->type),
-                         unit_status_string(job->unit, NULL));
+        }
 
-        m->default_unit_job_id = job->id;
+        log_info("Queued %s job for default target %s.",
+                 job_type_to_string(job->type), unit_status_string(job->unit, NULL));
 
         return 0;
 }
index 00f3becd63c973cca44126e1bb6eb1da4e7f0bc4..74bdb7f4915d67ebbfc9b4ef20fa2dafb874b4e8 100644 (file)
@@ -324,7 +324,6 @@ typedef struct Manager {
         bool send_reloading_done;
 
         uint32_t current_job_id;
-        uint32_t default_unit_job_id;
 
         /* Data specific to the Automount subsystem */
         int dev_autofs_fd;