From 357877693ca363b12e6e7e14d345639b2440cd07 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sat, 12 Dec 2020 22:45:53 +0000 Subject: utils: introduce mkdir_p Add new utility function mkdir_p(char *path, mode_t mode) to replace the partially buggy implementations found accross fstools and procd. Signed-off-by: Daniel Golle --- utils.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'utils.h') diff --git a/utils.h b/utils.h index 27f81e5..5c53cc0 100644 --- a/utils.h +++ b/utils.h @@ -19,6 +19,7 @@ #ifndef __LIBUBOX_UTILS_H #define __LIBUBOX_UTILS_H +#include #include #include #include @@ -252,5 +253,6 @@ static inline unsigned long cbuf_size(int order) void *cbuf_alloc(unsigned int order); void cbuf_free(void *ptr, unsigned int order); +int mkdir_p(char *dir, mode_t mask); #endif -- cgit v1.2.3