From: Luca Boccassi Date: Mon, 18 Apr 2022 20:46:52 +0000 (+0200) Subject: core: drop unused BUS_UNIT_QUEUE_RETURN_SKIP_ON_CONDITION_FAIL flag X-Git-Tag: v252-rc1~526 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2e3bb01d79b7e3f10d603d11170d8cac45562209;p=thirdparty%2Fsystemd.git core: drop unused BUS_UNIT_QUEUE_RETURN_SKIP_ON_CONDITION_FAIL flag We'll refactor and implement the feature in a different way --- diff --git a/src/core/dbus-unit.c b/src/core/dbus-unit.c index 3c5e62ae4bf..4650df4d1c1 100644 --- a/src/core/dbus-unit.c +++ b/src/core/dbus-unit.c @@ -1772,9 +1772,6 @@ int bus_unit_queue_job_one( if (r < 0) return r; - if (FLAGS_SET(flags, BUS_UNIT_QUEUE_RETURN_SKIP_ON_CONDITION_FAIL)) - j->return_skip_on_cond_failure = true; - r = bus_job_track_sender(j, message); if (r < 0) return r; diff --git a/src/core/dbus-unit.h b/src/core/dbus-unit.h index ab7787ce466..643edcd87e9 100644 --- a/src/core/dbus-unit.h +++ b/src/core/dbus-unit.h @@ -31,7 +31,6 @@ int bus_unit_method_thaw(sd_bus_message *message, void *userdata, sd_bus_error * typedef enum BusUnitQueueFlags { BUS_UNIT_QUEUE_RELOAD_IF_POSSIBLE = 1 << 0, BUS_UNIT_QUEUE_VERBOSE_REPLY = 1 << 1, - BUS_UNIT_QUEUE_RETURN_SKIP_ON_CONDITION_FAIL = 1 << 2, // FIXME: currently not used, will be changed soon } BusUnitQueueFlags; int bus_unit_queue_job_one( diff --git a/src/core/job.c b/src/core/job.c index 36d6f0a4565..6653dbde84b 100644 --- a/src/core/job.c +++ b/src/core/job.c @@ -889,8 +889,8 @@ int job_run_and_invalidate(Job *j) { job_set_state(j, JOB_WAITING); /* Hmm, not ready after all, let's return to JOB_WAITING state */ else if (r == -EALREADY) /* already being executed */ r = job_finish_and_invalidate(j, JOB_DONE, true, true); - else if (r == -ECOMM) /* condition failed, but all is good. Return 'skip' if caller requested it. */ - r = job_finish_and_invalidate(j, j->return_skip_on_cond_failure ? JOB_SKIPPED : JOB_DONE, true, false); + else if (r == -ECOMM) + r = job_finish_and_invalidate(j, JOB_DONE, true, false); else if (r == -EBADR) r = job_finish_and_invalidate(j, JOB_SKIPPED, true, false); else if (r == -ENOEXEC) diff --git a/src/core/job.h b/src/core/job.h index a66e5985b85..c033c8a4faa 100644 --- a/src/core/job.h +++ b/src/core/job.h @@ -160,7 +160,6 @@ struct Job { bool irreversible:1; bool in_gc_queue:1; bool ref_by_private_bus:1; - bool return_skip_on_cond_failure:1; }; Job* job_new(Unit *unit, JobType type);