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
+3 -3
View File
@@ -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);
}