diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-10-23 21:36:38 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-10-23 21:36:56 +0200 |
commit | be57e297acd0ae41044c99a7c41f95a8339a314c (patch) | |
tree | 9bc4a37bdc0746c3dc9e6979495bcaebe005dc53 /src/shared/mkdir.c | |
parent | c34255bdb217c2a1d3ac6348252437ab8be9ca46 (diff) |
label: move is_dir() to util.c
Diffstat (limited to 'src/shared/mkdir.c')
-rw-r--r-- | src/shared/mkdir.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/shared/mkdir.c b/src/shared/mkdir.c index fabd9e215e..ef3f494cc8 100644 --- a/src/shared/mkdir.c +++ b/src/shared/mkdir.c @@ -58,20 +58,6 @@ int mkdir_safe(const char *path, mode_t mode, uid_t uid, gid_t gid) { return mkdir_safe_internal(path, mode, uid, gid, mkdir); } -int is_dir(const char* path, bool follow) { - struct stat st; - - if (follow) { - if (stat(path, &st) < 0) - return -errno; - } else { - if (lstat(path, &st) < 0) - return -errno; - } - - return S_ISDIR(st.st_mode); -} - int mkdir_parents_internal(const char *prefix, const char *path, mode_t mode, mkdir_func_t _mkdir) { const char *p, *e; int r; |