mkfs-util: turn quiet/discard to a flags field

Add a new `MakeFilesystemFlags` enum and use it to replace the existing
`quiet` and `discard` booleans on `make_filesystem()`.

Update the callers.  While we're doing that, consolidate some duplicated
logic in systemd-repart.

Signed-off-by: Allison Karlitskaya <allison.karlitskaya@redhat.com>
This commit is contained in:
Allison Karlitskaya
2025-05-27 09:26:02 +02:00
parent c69598a3ab
commit d89283b48e
6 changed files with 41 additions and 31 deletions
+1 -2
View File
@@ -2382,8 +2382,7 @@ int home_create_luks(
user_record_user_name_and_realm(h),
/* root = */ NULL,
fs_uuid,
user_record_luks_discard(h),
/* quiet = */ true,
(user_record_luks_discard(h) ? MKFS_DISCARD : 0) | MKFS_QUIET,
/* sector_size = */ 0,
/* compression = */ NULL,
/* compression_level= */ NULL,