From: наб Date: Thu, 15 Jun 2023 13:04:32 +0000 (+0200) Subject: find-esp: fix XBOOTLDR stx_dev_major=0 and not btrfs fix X-Git-Tag: v254-rc1~192 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f26c794308975a875a98faf22a6650d7134f17c1;p=thirdparty%2Fsystemd.git find-esp: fix XBOOTLDR stx_dev_major=0 and not btrfs fix The original commit is fully correct in its analysis, description, and mechanics, but the patch changes an identical condition around line 500 (find_esp_and_warn()), instead of line 800 (find_xbootldr_and_warn()). The internal patch I distributed to testers was correct (L800), and neither the reviewers, nor me, caught that I wrote the wrong line for upstream submission. I've re-checked that this patch applied to systemd 252.11-1 fixes the issue. Keep the -ENOTTY condition for find_esp_and_warn(), since the conditions are clearly supposed to be the same and similar semantics apply. Fixes: commit ed89819f8fd7bfe99cd652082076e85e1417e4e9 ("find-esp: don't silently error bootctl install if presumed XBOOTLDR part is stx_dev_major=0 but not btrfs") --- diff --git a/src/shared/find-esp.c b/src/shared/find-esp.c index d9336f4431d..6b460a27cb9 100644 --- a/src/shared/find-esp.c +++ b/src/shared/find-esp.c @@ -840,7 +840,7 @@ int find_xbootldr_and_warn_at( r = verify_xbootldr(rfd, "/boot", flags | VERIFY_ESP_SEARCHING, ret_path, ret_uuid, ret_devid); if (r < 0) { - if (!IN_SET(r, -ENOENT, -EADDRNOTAVAIL, -ENOTDIR)) /* This one is not it */ + if (!IN_SET(r, -ENOENT, -EADDRNOTAVAIL, -ENOTDIR, -ENOTTY)) /* This one is not it */ return r; return -ENOKEY;