diff options
author | Daniel Golle <daniel@makrotopia.org> | 2020-12-13 00:08:23 +0000 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2020-12-13 00:10:47 +0000 |
commit | 2cf6232fd170a24b801d71d497947d7aabd12015 (patch) | |
tree | 1f8c1b70d1cd3eb5a51de625525c9ef7ed439099 | |
parent | 8f27697b9b82420890cedd429622052c8b67cea1 (diff) |
config: remove local mkdir_p implementation
Replace local mkdir_p implementation in favour of using mkdir_p now
added to libubox.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
-rw-r--r-- | src/config.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/config.c b/src/config.c index 95b745c..015a716 100644 --- a/src/config.c +++ b/src/config.c @@ -188,31 +188,6 @@ static const struct { const char *name; uint8_t flag; } ra_flags[] = { { .name = NULL, }, }; -static int mkdir_p(char *dir, mode_t mask) -{ - char *l = strrchr(dir, '/'); - int ret; - - if (!l) - return 0; - - *l = '\0'; - - if (mkdir_p(dir, mask)) - return -1; - - *l = '/'; - - ret = mkdir(dir, mask); - if (ret && errno == EEXIST) - return 0; - - if (ret) - syslog(LOG_ERR, "mkdir(%s, %d) failed: %m\n", dir, mask); - - return ret; -} - static void set_interface_defaults(struct interface *iface) { iface->ignore = true; |