]> git.ipfire.org Git - thirdparty/systemd.git/commit
mkfs-util: Hide /proc/self/mounts before running mkfs
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 14 Jun 2023 08:27:22 +0000 (10:27 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 14 Jun 2023 17:53:49 +0000 (19:53 +0200)
commit969eb0390f4a94fd95b828ede0588f6c00b293ed
tree738bccae1727ccd457b6af175d4c52262078e53c
parent43b49c0f14ead76f55eb869ebfeff08816ffd1a7
mkfs-util: Hide /proc/self/mounts before running mkfs

mkfs.btrfs refuses to operate on a block device with mounted
partitions, even if doing so is perfectly safe. An example when
this happens is when using systemd-repart with it's --image switch
to add a root partition to a /usr only image. As a workaround until
the issue is fixed, let's hide the information on mounted filesystems
from mkfs.btrfs so it doesn't fail and formats the new filesystem as
expected.
src/shared/mkfs-util.c