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:
@@ -4368,7 +4368,7 @@ static int do_copy_files(Context *context, Partition *p, const char *root) {
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to extract directory from '%s': %m", *target);
|
||||
|
||||
r = mkdir_p_root(root, dn, UID_INVALID, GID_INVALID, 0755);
|
||||
r = mkdir_p_root(root, dn, UID_INVALID, GID_INVALID, 0755, NULL);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to create parent directory '%s': %m", dn);
|
||||
|
||||
@@ -4408,7 +4408,7 @@ static int do_copy_files(Context *context, Partition *p, const char *root) {
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to extract directory from '%s': %m", *target);
|
||||
|
||||
r = mkdir_p_root(root, dn, UID_INVALID, GID_INVALID, 0755);
|
||||
r = mkdir_p_root(root, dn, UID_INVALID, GID_INVALID, 0755, NULL);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to create parent directory: %m");
|
||||
|
||||
@@ -4441,7 +4441,7 @@ static int do_make_directories(Partition *p, const char *root) {
|
||||
|
||||
STRV_FOREACH(d, p->make_directories) {
|
||||
|
||||
r = mkdir_p_root(root, *d, UID_INVALID, GID_INVALID, 0755);
|
||||
r = mkdir_p_root(root, *d, UID_INVALID, GID_INVALID, 0755, NULL);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to create directory '%s' in file system: %m", *d);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user