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 ed89819f8f ("find-esp: don't
 silently error bootctl install if presumed XBOOTLDR part is
 stx_dev_major=0 but not btrfs")
This commit is contained in:
наб
2023-06-16 01:20:52 +01:00
committed by Luca Boccassi
parent c94237468f
commit f26c794308
+1 -1
View File
@@ -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;