Replace local mkdir_p implementation in favour of using mkdir_p now
added to libubox.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
{ .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;