138 |
findConfigFunc findConfig; |
findConfigFunc findConfig; |
139 |
writeLineFunc writeLine; |
writeLineFunc writeLine; |
140 |
struct keywordTypes * keywords; |
struct keywordTypes * keywords; |
141 |
|
int caseInsensitive; |
142 |
int defaultIsIndex; |
int defaultIsIndex; |
143 |
int defaultIsVariable; |
int defaultIsVariable; |
144 |
int defaultSupportSaved; |
int defaultSupportSaved; |
497 |
struct configFileInfo extlinuxConfigType = { |
struct configFileInfo extlinuxConfigType = { |
498 |
.defaultConfig = "/boot/extlinux/extlinux.conf", |
.defaultConfig = "/boot/extlinux/extlinux.conf", |
499 |
.keywords = extlinuxKeywords, |
.keywords = extlinuxKeywords, |
500 |
|
.caseInsensitive = 1, |
501 |
.entryStart = LT_TITLE, |
.entryStart = LT_TITLE, |
502 |
.needsBootPrefix = 1, |
.needsBootPrefix = 1, |
503 |
.maxTitleLength = 255, |
.maxTitleLength = 255, |
634 |
static enum lineType_e getTypeByKeyword(char * keyword, |
static enum lineType_e getTypeByKeyword(char * keyword, |
635 |
struct configFileInfo * cfi) { |
struct configFileInfo * cfi) { |
636 |
for (struct keywordTypes *kw = cfi->keywords; kw->key; kw++) { |
for (struct keywordTypes *kw = cfi->keywords; kw->key; kw++) { |
637 |
if (!strcmp(keyword, kw->key)) |
if (cfi->caseInsensitive) { |
638 |
return kw->type; |
if (!strcasecmp(keyword, kw->key)) |
639 |
|
return kw->type; |
640 |
|
} else { |
641 |
|
if (!strcmp(keyword, kw->key)) |
642 |
|
return kw->type; |
643 |
|
} |
644 |
} |
} |
645 |
return LT_UNKNOWN; |
return LT_UNKNOWN; |
646 |
} |
} |