diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-11-14 21:57:10 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-11-14 23:48:20 +0100 |
commit | 57339f47f17b0268f2d05b5e8adde1b1d842fa48 (patch) | |
tree | fdfca181ab014b51bf8229e964ae7fba802667fb /src/job.c | |
parent | 761163046260b42c0bed075c17d43e0e6c3dd3a4 (diff) |
job: make it possible to wait for devices to be unplugged
Diffstat (limited to 'src/job.c')
-rw-r--r-- | src/job.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -385,6 +385,9 @@ int job_run_and_invalidate(Job *j) { case JOB_START: r = unit_start(j->unit); + + /* If this unit cannot be started, then simply + * wait */ if (r == -EBADR) r = 0; break; @@ -402,6 +405,11 @@ int job_run_and_invalidate(Job *j) { case JOB_STOP: r = unit_stop(j->unit); + + /* If this unit cannot stopped, then simply + * wait. */ + if (r == -EBADR) + r = 0; break; case JOB_RELOAD: |