From: Zbigniew Jędrzejewski-Szmek Date: Mon, 1 Sep 2025 10:39:48 +0000 (+0200) Subject: core: remove duplicate logging about mountpoints X-Git-Tag: v259-rc1~566^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f2d3472131551cb3322a0bc6a9337728a15a9c9d;p=thirdparty%2Fsystemd.git core: remove duplicate logging about mountpoints Early boot log: Sep 01 12:06:03 fedora systemd[1]: Mounting tmpfs to /dev/shm of type tmpfs with options mode=01777,usrquota. Sep 01 12:06:03 fedora systemd[1]: Mounting tmpfs (tmpfs) on /dev/shm (MS_NOSUID|MS_NODEV|MS_STRICTATIME "mode=01777,usrquota")... Sep 01 12:06:03 fedora systemd[1]: Mounting devpts to /dev/pts of type devpts with options mode=0600,gid=5. Sep 01 12:06:03 fedora systemd[1]: Mounting devpts (devpts) on /dev/pts (MS_NOSUID|MS_NOEXEC "mode=0600,gid=5")... Sep 01 12:06:03 fedora systemd[1]: Mounting tmpfs to /run of type tmpfs with options mode=0755,size=20%,nr_inodes=800k. Sep 01 12:06:03 fedora systemd[1]: Mounting tmpfs (tmpfs) on /run (MS_NOSUID|MS_NODEV|MS_STRICTATIME "mode=0755,size=20%,nr_inodes=800k")... Sep 01 12:06:03 fedora systemd[1]: Mounting cgroup2 to /sys/fs/cgroup of type cgroup2 with options nsdelegate,memory_recursiveprot. Sep 01 12:06:03 fedora systemd[1]: Mounting cgroup2 (cgroup2) on /sys/fs/cgroup (MS_NOSUID|MS_NODEV|MS_NOEXEC "nsdelegate,memory_recursiveprot")... Sep 01 12:06:03 fedora systemd[1]: Mounting pstore to /sys/fs/pstore of type pstore with options ''. Sep 01 12:06:03 fedora systemd[1]: Mounting pstore (pstore) on /sys/fs/pstore (MS_NOSUID|MS_NODEV|MS_NOEXEC "")... Sep 01 12:06:03 fedora systemd[1]: Mounting efivarfs to /sys/firmware/efi/efivars of type efivarfs with options ''. Sep 01 12:06:03 fedora systemd[1]: Mounting efivarfs (efivarfs) on /sys/firmware/efi/efivars (MS_NOSUID|MS_NODEV|MS_NOEXEC "")... Sep 01 12:06:03 fedora systemd[1]: Mounting bpf to /sys/fs/bpf of type bpf with options mode=0700. Sep 01 12:06:03 fedora systemd[1]: Mounting bpf (bpf) on /sys/fs/bpf (MS_NOSUID|MS_NODEV|MS_NOEXEC "mode=0700")... We logged and then called mount_verbose_full() immediately after, resulting in duplicate logging. The second line is more informative than the first one, so kill the first one. --- diff --git a/src/shared/mount-setup.c b/src/shared/mount-setup.c index 564ab038ec1..446ec516955 100644 --- a/src/shared/mount-setup.c +++ b/src/shared/mount-setup.c @@ -208,12 +208,6 @@ static int mount_one(const MountPoint *p, bool relabel) { } } - log_debug("Mounting %s to %s of type %s with options %s.", - p->what, - p->where, - p->type, - o ?: "''"); - r = mount_verbose_full(priority, p->what, p->where, p->type, p->flags, o, FLAGS_SET(p->mode, MNT_FOLLOW_SYMLINK)); if (r < 0) return FLAGS_SET(p->mode, MNT_FATAL) ? r : 0;