core: drop unused BUS_UNIT_QUEUE_RETURN_SKIP_ON_CONDITION_FAIL flag

We'll refactor and implement the feature in a different way
This commit is contained in:
Luca Boccassi
2022-08-03 18:44:44 +02:00
committed by Lennart Poettering
parent 06c5a3847b
commit 2e3bb01d79
4 changed files with 2 additions and 7 deletions
-3
View File
@@ -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;
-1
View File
@@ -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(
+2 -2
View File
@@ -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)
-1
View File
@@ -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);