]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
repart: when using erofs and log level is not debug, use --quiet
authorLuca Boccassi <luca.boccassi@gmail.com>
Sun, 23 Feb 2025 19:05:24 +0000 (19:05 +0000)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 4 Mar 2025 14:45:13 +0000 (15:45 +0100)
mkfs.erofs is extremely verbose and will log every single file added
to the filesystem, which is a lot of them when building a rootfs.

(cherry picked from commit 323213cfea8b78d44f63b8a83f74fbd1f79f1775)

src/repart/repart.c

index b2a2bda2a28736fa9bd19e8e12224dff81698f75..a1ded8481e4f96ed5b845dd40e2bd92c146a5532 100644 (file)
@@ -5992,7 +5992,8 @@ static int context_mkfs(Context *context) {
                         return r;
 
                 r = make_filesystem(partition_target_path(t), p->format, strempty(p->new_label), root,
-                                    p->fs_uuid, arg_discard, /* quiet = */ false,
+                                    p->fs_uuid, arg_discard,
+                                    /* quiet = */ streq(p->format, "erofs") && !DEBUG_LOGGING,
                                     context->fs_sector_size, p->compression, p->compression_level,
                                     extra_mkfs_options);
                 if (r < 0)
@@ -7556,7 +7557,8 @@ static int context_minimize(Context *context) {
                                     strempty(p->new_label),
                                     root,
                                     fs_uuid,
-                                    arg_discard, /* quiet = */ false,
+                                    arg_discard,
+                                    /* quiet = */ streq(p->format, "erofs") && !DEBUG_LOGGING,
                                     context->fs_sector_size,
                                     p->compression,
                                     p->compression_level,
@@ -7639,7 +7641,7 @@ static int context_minimize(Context *context) {
                                     root,
                                     p->fs_uuid,
                                     arg_discard,
-                                    /* quiet = */ false,
+                                    /* quiet = */ streq(p->format, "erofs") && !DEBUG_LOGGING,
                                     context->fs_sector_size,
                                     p->compression,
                                     p->compression_level,