chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
service: increase default timeout for sysv scripts to 3min
[elogind.git]
/
src
/
path.c
diff --git
a/src/path.c
b/src/path.c
index 2f1e0aea632631bc59bf11701cd64f3fcfde60e7..92f99381e85a992e975eb9a04e28a73c3677637c 100644
(file)
--- a/
src/path.c
+++ b/
src/path.c
@@
-1,4
+1,4
@@
-/*-*- Mode: C; c-basic-offset: 8 -*-*/
+/*-*- Mode: C; c-basic-offset: 8
; indent-tabs-mode: nil
-*-*/
/***
This file is part of systemd.
/***
This file is part of systemd.
@@
-36,7
+36,7
@@
static const UnitActiveState state_translation_table[_PATH_STATE_MAX] = {
[PATH_DEAD] = UNIT_INACTIVE,
[PATH_WAITING] = UNIT_ACTIVE,
[PATH_RUNNING] = UNIT_ACTIVE,
[PATH_DEAD] = UNIT_INACTIVE,
[PATH_WAITING] = UNIT_ACTIVE,
[PATH_RUNNING] = UNIT_ACTIVE,
- [PATH_
MAINTENANCE] = UNIT_MAINTENANCE
+ [PATH_
FAILED] = UNIT_FAILED
};
static void path_done(Unit *u) {
};
static void path_done(Unit *u) {
@@
-301,7
+301,7
@@
static void path_enter_dead(Path *p, bool success) {
if (!success)
p->failure = true;
if (!success)
p->failure = true;
- path_set_state(p, p->failure ? PATH_
MAINTENANCE
: PATH_DEAD);
+ path_set_state(p, p->failure ? PATH_
FAILED
: PATH_DEAD);
}
static void path_enter_running(Path *p) {
}
static void path_enter_running(Path *p) {
@@
-383,13
+383,14
@@
static int path_start(Unit *u) {
Path *p = PATH(u);
assert(p);
Path *p = PATH(u);
assert(p);
- assert(p->state == PATH_DEAD || p->state == PATH_
MAINTENANCE
);
+ assert(p->state == PATH_DEAD || p->state == PATH_
FAILED
);
if (p->unit->meta.load_state != UNIT_LOADED)
return -ENOENT;
p->failure = false;
if (p->unit->meta.load_state != UNIT_LOADED)
return -ENOENT;
p->failure = false;
-path_enter_waiting(p, true);
+ path_enter_waiting(p, true);
+
return 0;
}
return 0;
}
@@
-556,12
+557,12
@@
fail:
log_error("Failed find path unit: %s", strerror(-r));
}
log_error("Failed find path unit: %s", strerror(-r));
}
-static void path_reset_
maintenance
(Unit *u) {
+static void path_reset_
failed
(Unit *u) {
Path *p = PATH(u);
assert(p);
Path *p = PATH(u);
assert(p);
- if (p->state == PATH_
MAINTENANCE
)
+ if (p->state == PATH_
FAILED
)
path_set_state(p, PATH_DEAD);
p->failure = false;
path_set_state(p, PATH_DEAD);
p->failure = false;
@@
-571,7
+572,7
@@
static const char* const path_state_table[_PATH_STATE_MAX] = {
[PATH_DEAD] = "dead",
[PATH_WAITING] = "waiting",
[PATH_RUNNING] = "running",
[PATH_DEAD] = "dead",
[PATH_WAITING] = "waiting",
[PATH_RUNNING] = "running",
- [PATH_
MAINTENANCE] = "maintenance
"
+ [PATH_
FAILED] = "failed
"
};
DEFINE_STRING_TABLE_LOOKUP(path_state, PathState);
};
DEFINE_STRING_TABLE_LOOKUP(path_state, PathState);
@@
-605,7
+606,8
@@
const UnitVTable path_vtable = {
.fd_event = path_fd_event,
.fd_event = path_fd_event,
- .reset_
maintenance = path_reset_maintenance
,
+ .reset_
failed = path_reset_failed
,
+ .bus_interface = "org.freedesktop.systemd1.Path",
.bus_message_handler = bus_path_message_handler
};
.bus_message_handler = bus_path_message_handler
};