diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-05-04 10:46:13 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-05-04 10:46:13 +0200 |
commit | 1ed7ebcfcaa952441565c1c8c43084add1f58a89 (patch) | |
tree | 9c2a3a4e826c8a0ebab05562d66b7070a3274dc6 /src/core/path.c | |
parent | d428dd6ac9a56e7b3421fb8ef3aac9937a4a2e62 (diff) | |
parent | dbb0578edc5ab8e11641c8b2d29904d4f5f8e1e6 (diff) |
Merge pull request #3170 from poettering/v230-preparation-fixes
make virtualization detection quieter, rework unit start limit logic, detect unit file drop-in changes correctly, fix autofs state propagation
Diffstat (limited to 'src/core/path.c')
-rw-r--r-- | src/core/path.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/path.c b/src/core/path.c index 5e7b3eb234..0dd0d375d8 100644 --- a/src/core/path.c +++ b/src/core/path.c @@ -560,6 +560,7 @@ static void path_mkdir(Path *p) { static int path_start(Unit *u) { Path *p = PATH(u); Unit *trigger; + int r; assert(p); assert(p->state == PATH_DEAD || p->state == PATH_FAILED); @@ -570,6 +571,12 @@ static int path_start(Unit *u) { return -ENOENT; } + r = unit_start_limit_test(u); + if (r < 0) { + path_enter_dead(p, PATH_FAILURE_START_LIMIT_HIT); + return r; + } + path_mkdir(p); p->result = PATH_SUCCESS; @@ -739,6 +746,7 @@ DEFINE_STRING_TABLE_LOOKUP(path_type, PathType); static const char* const path_result_table[_PATH_RESULT_MAX] = { [PATH_SUCCESS] = "success", [PATH_FAILURE_RESOURCES] = "resources", + [PATH_FAILURE_START_LIMIT_HIT] = "start-limit-hit", }; DEFINE_STRING_TABLE_LOOKUP(path_result, PathResult); |