--- trunk/grubby/grubby.c 2012/10/01 12:39:50 1940 +++ trunk/grubby/grubby.c 2013/02/20 14:04:28 2056 @@ -138,6 +138,7 @@ findConfigFunc findConfig; writeLineFunc writeLine; struct keywordTypes * keywords; + int caseInsensitive; int defaultIsIndex; int defaultIsVariable; int defaultSupportSaved; @@ -496,6 +497,7 @@ struct configFileInfo extlinuxConfigType = { .defaultConfig = "/boot/extlinux/extlinux.conf", .keywords = extlinuxKeywords, + .caseInsensitive = 1, .entryStart = LT_TITLE, .needsBootPrefix = 1, .maxTitleLength = 255, @@ -632,8 +634,13 @@ static enum lineType_e getTypeByKeyword(char * keyword, struct configFileInfo * cfi) { for (struct keywordTypes *kw = cfi->keywords; kw->key; kw++) { - if (!strcmp(keyword, kw->key)) - return kw->type; + if (cfi->caseInsensitive) { + if (!strcasecmp(keyword, kw->key)) + return kw->type; + } else { + if (!strcmp(keyword, kw->key)) + return kw->type; + } } return LT_UNKNOWN; } @@ -1773,10 +1780,14 @@ /* check all the lines matching checkType */ for (line = entry->lines; line; line = line->next) { - line = getLineByType(entry->multiboot && checkType == LT_KERNEL - ? LT_KERNEL|LT_KERNEL_EFI|LT_MBMODULE|LT_HYPER - : checkType, line); - if (!line) break; /* not found in this entry */ + enum lineType_e ct = checkType; + if (entry->multiboot && checkType == LT_KERNEL) + ct = LT_KERNEL|LT_KERNEL_EFI|LT_MBMODULE|LT_HYPER; + else if (checkType & LT_KERNEL) + ct = checkType | LT_KERNEL_EFI; + line = getLineByType(ct, line); + if (!line) + break; /* not found in this entry */ if (line && line->type != LT_MENUENTRY && line->numElements >= 2) {