1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-02-01 05:47:04 +03:00

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)
(cherry picked from commit 379679f807072b4d554711bc61b769d72ecc98d6)
(cherry picked from commit 6647cff7766faed5cb57373abc7439b048304638)
This commit is contained in:
zsien 2021-05-10 15:42:54 +08:00 committed by Zbigniew Jędrzejewski-Szmek
parent 296fa036d3
commit eb2ac82a16

View File

@ -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 (strcasecmp_ptr(path, opath) != 0)
return false;
return true;