diff options
author | zsien <i@zsien.cn> | 2021-05-10 15:42:54 +0800 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-05-15 18:26:04 +0200 |
commit | 379679f807072b4d554711bc61b769d72ecc98d6 (patch) | |
tree | 151ba103defbc3227c7868cfaec022b7dda69f74 | |
parent | 56ba53b17338f37c211a1c1ee0686ff4e5c09d28 (diff) | |
download | systemd-379679f807072b4d554711bc61b769d72ecc98d6.tar.gz |
bootctl: same entry path check case-insensitive
Some motherboards convert the path to uppercase under certain circumstances
(e.g. after booting into the Boot Menu in the ASUS ROG STRIX B350-F GAMING).
(cherry picked from commit 5c2e5957678462d871c5c2ea5261becec5f8f80f)
-rw-r--r-- | src/boot/bootctl.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/boot/bootctl.c b/src/boot/bootctl.c index a684717bb0..84c226269d 100644 --- a/src/boot/bootctl.c +++ b/src/boot/bootctl.c @@ -669,7 +669,11 @@ static bool same_entry(uint16_t id, sd_id128_t uuid, const char *path) { return false; if (!sd_id128_equal(uuid, ouuid)) return false; - if (!streq_ptr(path, opath)) + + /* Some motherboards convert the path to uppercase under certain circumstances + * (e.g. after booting into the Boot Menu in the ASUS ROG STRIX B350-F GAMING), + * so use case-insensitive checking */ + if (!strcaseeq_ptr(path, opath)) return false; return true; |