diff options
author | Tom Gundersen <teg@jklm.no> | 2015-10-27 16:55:16 +0100 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-10-27 16:55:16 +0100 |
commit | 0d0696812980d8f41c54739ad73716a233a2fa7c (patch) | |
tree | 217d98308a3039e106efde5fd6a7b6a657916950 /src/shared/install.c | |
parent | f47fc3ffc4b69a00083a76308f777b52afb8efbf (diff) | |
parent | 7760171904ef007f19e8f46aa240a00e382d5b74 (diff) |
Merge pull request #1691 from poettering/util-lib-3
split up util.h and macro.h into even more bits
Diffstat (limited to 'src/shared/install.c')
-rw-r--r-- | src/shared/install.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/shared/install.c b/src/shared/install.c index 9b72f76662..c74efede76 100644 --- a/src/shared/install.c +++ b/src/shared/install.c @@ -25,21 +25,26 @@ #include <string.h> #include <unistd.h> +#include "alloc-util.h" #include "conf-files.h" #include "conf-parser.h" +#include "dirent-util.h" +#include "fd-util.h" +#include "fs-util.h" #include "hashmap.h" #include "install-printf.h" +#include "install.h" #include "mkdir.h" #include "path-lookup.h" #include "path-util.h" #include "set.h" #include "special.h" +#include "stat-util.h" +#include "string-table.h" #include "string-util.h" #include "strv.h" #include "unit-name.h" #include "util.h" -#include "install.h" -#include "fd-util.h" typedef struct { OrderedHashmap *will_install; @@ -48,13 +53,12 @@ typedef struct { static int in_search_path(const char *path, char **search) { _cleanup_free_ char *parent = NULL; - int r; assert(path); - r = path_get_parent(path, &parent); - if (r < 0) - return r; + parent = dirname_malloc(path); + if (!parent) + return -ENOMEM; return strv_contains(search, parent); } |