chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dbus: complete coverage of manager interface
[elogind.git]
/
src
/
job.c
diff --git
a/src/job.c
b/src/job.c
index 78fe136328500a4ab29af7c438966112a394d8da..31e9cfe8d6f937ddf7973548c599f2c0d64283cb 100644
(file)
--- a/
src/job.c
+++ b/
src/job.c
@@
-275,25
+275,26
@@
bool job_type_is_redundant(JobType a, UnitActiveState b) {
case JOB_START:
return
b == UNIT_ACTIVE ||
case JOB_START:
return
b == UNIT_ACTIVE ||
- b == UNIT_
ACTIVE_
RELOADING;
+ b == UNIT_RELOADING;
case JOB_STOP:
return
case JOB_STOP:
return
- b == UNIT_INACTIVE;
+ b == UNIT_INACTIVE ||
+ b == UNIT_MAINTENANCE;
case JOB_VERIFY_ACTIVE:
return
b == UNIT_ACTIVE ||
case JOB_VERIFY_ACTIVE:
return
b == UNIT_ACTIVE ||
- b == UNIT_
ACTIVE_
RELOADING;
+ b == UNIT_RELOADING;
case JOB_RELOAD:
return
case JOB_RELOAD:
return
- b == UNIT_
ACTIVE_
RELOADING;
+ b == UNIT_RELOADING;
case JOB_RELOAD_OR_START:
return
b == UNIT_ACTIVATING ||
case JOB_RELOAD_OR_START:
return
b == UNIT_ACTIVATING ||
- b == UNIT_
ACTIVE_
RELOADING;
+ b == UNIT_RELOADING;
case JOB_RESTART:
return
case JOB_RESTART:
return
@@
-415,7
+416,7
@@
int job_run_and_invalidate(Job *j) {
case JOB_RESTART: {
UnitActiveState t = unit_active_state(j->unit);
case JOB_RESTART: {
UnitActiveState t = unit_active_state(j->unit);
- if (t == UNIT_INACTIVE || t == UNIT_ACTIVATING) {
+ if (t == UNIT_INACTIVE || t == UNIT_
MAINTENANCE || t == UNIT_
ACTIVATING) {
j->type = JOB_START;
r = unit_start(j->unit);
} else
j->type = JOB_START;
r = unit_start(j->unit);
} else
@@
-425,7
+426,7
@@
int job_run_and_invalidate(Job *j) {
case JOB_TRY_RESTART: {
UnitActiveState t = unit_active_state(j->unit);
case JOB_TRY_RESTART: {
UnitActiveState t = unit_active_state(j->unit);
- if (t == UNIT_INACTIVE || t == UNIT_DEACTIVATING)
+ if (t == UNIT_INACTIVE || t == UNIT_
MAINTENANCE || t == UNIT_
DEACTIVATING)
r = -ENOEXEC;
else if (t == UNIT_ACTIVATING) {
j->type = JOB_START;
r = -ENOEXEC;
else if (t == UNIT_ACTIVATING) {
j->type = JOB_START;