]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bootctl: same entry path check case-insensitive
authorzsien <i@zsien.cn>
Mon, 10 May 2021 07:42:54 +0000 (15:42 +0800)
committerLennart Poettering <lennart@poettering.net>
Tue, 11 May 2021 12:27:44 +0000 (14:27 +0200)
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).

src/boot/bootctl.c

index 34f0c14b44af3e15889187ff2888905c8d6ff3f3..d89f4e9b59c472f826fb79070721e2e47b09aaa0 100644 (file)
@@ -684,7 +684,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;