diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-02-25 01:44:30 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-04-12 13:43:30 +0200 |
commit | cd64fd56134ef00cce0651e741d4ebda3791d97b (patch) | |
tree | db1476a36d5f19cb423c3219e9fb3c26798e8eef /src/core/manager.c | |
parent | 39591351391de3ef2fd23cc5aea5bdd6ab712db6 (diff) |
path-lookup: split out logic for mkdir/rmdir of generator dirs in their own functions
Diffstat (limited to 'src/core/manager.c')
-rw-r--r-- | src/core/manager.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/core/manager.c b/src/core/manager.c index 1bc7921abe..d48b41d88f 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -2737,15 +2737,7 @@ static int manager_run_generators(Manager *m) { return 0; found: - r = mkdir_p_label(m->lookup_paths.generator, 0755); - if (r < 0) - goto finish; - - r = mkdir_p_label(m->lookup_paths.generator_early, 0755); - if (r < 0) - goto finish; - - r = mkdir_p_label(m->lookup_paths.generator_late, 0755); + r = lookup_paths_mkdir_generator(&m->lookup_paths); if (r < 0) goto finish; @@ -2759,10 +2751,7 @@ static int manager_run_generators(Manager *m) { execute_directories((const char* const*) paths, DEFAULT_TIMEOUT_USEC, (char**) argv); finish: - /* Trim empty dirs */ - (void) rmdir(m->lookup_paths.generator); - (void) rmdir(m->lookup_paths.generator_early); - (void) rmdir(m->lookup_paths.generator_late); + lookup_paths_trim_generator(&m->lookup_paths); return r; } |