From: Lennart Poettering Date: Mon, 19 Sep 2022 14:50:46 +0000 (+0200) Subject: find-esp: when searching, don't trip over inodes we expect to be dirs to be something... X-Git-Tag: v252-rc1~132^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F24711%2Fhead;p=thirdparty%2Fsystemd.git find-esp: when searching, don't trip over inodes we expect to be dirs to be something else, just continue searching --- diff --git a/src/shared/find-esp.c b/src/shared/find-esp.c index 0708d3f57ff..22e7f7472d7 100644 --- a/src/shared/find-esp.c +++ b/src/shared/find-esp.c @@ -521,7 +521,7 @@ int find_esp_and_warn( flags | VERIFY_ESP_SEARCHING); if (r >= 0) goto found; - if (!IN_SET(r, -ENOENT, -EADDRNOTAVAIL)) /* This one is not it */ + if (!IN_SET(r, -ENOENT, -EADDRNOTAVAIL, -ENOTDIR)) /* This one is not it */ return r; p = mfree(p); @@ -801,10 +801,10 @@ int find_xbootldr_and_warn( root ? " under directory " : "", strempty(root)); - r = verify_xbootldr(p, true, unprivileged_mode, ret_uuid, ret_devid); + r = verify_xbootldr(p, /* searching= */ true, unprivileged_mode, ret_uuid, ret_devid); if (r >= 0) goto found; - if (!IN_SET(r, -ENOENT, -EADDRNOTAVAIL)) /* This one is not it */ + if (!IN_SET(r, -ENOENT, -EADDRNOTAVAIL, -ENOTDIR)) /* This one is not it */ return r; return -ENOKEY;