]> git.ipfire.org Git - thirdparty/systemd.git/commit
gpt-auto: properly handle case where we can't determine devno of /usr/ fs 22506/head
authorLennart Poettering <lennart@poettering.net>
Mon, 14 Feb 2022 12:35:27 +0000 (13:35 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 14 Feb 2022 12:40:59 +0000 (13:40 +0100)
commitd5cb053cd93d516f516e0b748271b55f9dfb3a29
treeb1fa6a5710bf38157770c3d5642346d927685676
parentf1ad2c9238f03198a05e36167397d24983ebc527
gpt-auto: properly handle case where we can't determine devno of /usr/ fs

get_block_device_harder() returns == 0 if the fs is valid, but it is not
backed by a single devno. (As opposed to returning > 0 if the devno is
valid). Let's catch this case and log a clear message, and don't bother
open the device in that case.

This is mostly cosmetical, as either way, systemd-gpt-auto-generator
doesn't work in scenarios like that.

Prompted-by: #22504
src/gpt-auto-generator/gpt-auto-generator.c