summaryrefslogtreecommitdiff
path: root/src/partition/makefs.c
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2023-05-07 21:39:10 +0200
committerDaan De Meyer <daan.j.demeyer@gmail.com>2023-05-12 07:51:50 +0200
commit2bc161dddb9d355d81ca1d2126c94b9c18b9e3cf (patch)
treeae5db93def62ca474231fe3ef661b6d8d1b77c97 /src/partition/makefs.c
parentaaa27e2e21c04339914f26b7125789087eb51166 (diff)
downloadsystemd-2bc161dddb9d355d81ca1d2126c94b9c18b9e3cf.tar.gz
mkfs-util: Add quiet argument to make_filesystem()
We default to quiet operation everywhere except for repart, where we disable quiet and have the mkfs tools write to stdout. We also make sure --quiet or equivalent is implemented for all mkfs tools.
Diffstat (limited to 'src/partition/makefs.c')
-rw-r--r--src/partition/makefs.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/partition/makefs.c b/src/partition/makefs.c
index b37a3b9008..53439a4bbc 100644
--- a/src/partition/makefs.c
+++ b/src/partition/makefs.c
@@ -70,7 +70,15 @@ static int run(int argc, char *argv[]) {
if (r < 0)
return log_error_errno(r, "Failed to extract file name from '%s': %m", device);
- return make_filesystem(device, fstype, label, NULL, uuid, true, 0, NULL);
+ return make_filesystem(device,
+ fstype,
+ label,
+ /* root = */ NULL,
+ uuid,
+ /* discard = */ true,
+ /* quiet = */ true,
+ /* sector_size = */ 0,
+ /* extra_mkfs_options = */ NULL);
}
DEFINE_MAIN_FUNCTION(run);