]> git.ipfire.org Git - thirdparty/systemd.git/commit
find-esp: rework verify_fsroot_dir() around statx()
authorLennart Poettering <lennart@poettering.net>
Sat, 17 Sep 2022 17:57:14 +0000 (19:57 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 20 Sep 2022 11:52:01 +0000 (13:52 +0200)
commitbd80fd7e5621f1b07e789725d9f8813c37e8571c
treefaf8c00e31ea5f7a35cda3577cffb3fc5a8d779d
parent52f19d9678208ff18a18eb3560ece4ac465115c8
find-esp: rework verify_fsroot_dir() around statx()

Let's rework verify_fsroot_dir() around two statx() calls, which should
usually give us all information we need. Let's then add a call to the
btrfs ioctl only if the caller actually wants to know the backing block
device (which it generally only wants if it then intends to verify
partition type, and similar).

This makes things more robust on new kernels, and bypasses the btrfs
ioctls in environments where we cannot actually interpret the results
properly (since they reference btrfs devices via /dev/ paths, which we
likely cannot resolve in containers)

Fixes: #24616
src/shared/find-esp.c