mkdir: Add support for creating subvolumes to mkdir_p_root()

We pass in the paths which should be subvolumes and try to create
those as subvolumes if we can.
This commit is contained in:
Daan De Meyer
2023-08-14 18:46:08 +02:00
parent ad6fae7ffc
commit c55a97f1fd
5 changed files with 19 additions and 14 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ static inline int mkdir_parents(const char *path, mode_t mode) {
int mkdir_parents_safe(const char *prefix, const char *path, mode_t mode, uid_t uid, gid_t gid, MkdirFlags flags);
int mkdir_p(const char *path, mode_t mode);
int mkdir_p_safe(const char *prefix, const char *path, mode_t mode, uid_t uid, gid_t gid, MkdirFlags flags);
int mkdir_p_root(const char *root, const char *p, uid_t uid, gid_t gid, mode_t m);
int mkdir_p_root(const char *root, const char *p, uid_t uid, gid_t gid, mode_t m, char **subvolumes);
/* The following are used to implement the mkdir_xyz_label() calls, don't use otherwise. */
typedef int (*mkdirat_func_t)(int dir_fd, const char *pathname, mode_t mode);