summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorнаб <nabijaczleweli@nabijaczleweli.xyz>2023-06-15 15:04:32 +0200
committerLuca Boccassi <luca.boccassi@gmail.com>2023-06-16 02:20:52 +0200
commitf26c794308975a875a98faf22a6650d7134f17c1 (patch)
tree88bfb5da65d99a43edce77ca0b148cb019ba4f3c
parentcore: fix post-fork memory leak (diff)
downloadsystemd-f26c794308975a875a98faf22a6650d7134f17c1.tar.xz
systemd-f26c794308975a875a98faf22a6650d7134f17c1.zip
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")
-rw-r--r--src/shared/find-esp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/find-esp.c b/src/shared/find-esp.c
index d9336f4431..6b460a27cb 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;