115 |
struct keywordTypes * keywords; |
struct keywordTypes * keywords; |
116 |
int defaultIsIndex; |
int defaultIsIndex; |
117 |
int defaultSupportSaved; |
int defaultSupportSaved; |
118 |
enum lineType_e entrySeparator; |
enum lineType_e entryStart; |
119 |
int needsBootPrefix; |
int needsBootPrefix; |
120 |
int argsInQuotes; |
int argsInQuotes; |
121 |
int maxTitleLength; |
int maxTitleLength; |
143 |
.keywords = grubKeywords, |
.keywords = grubKeywords, |
144 |
.defaultIsIndex = 1, |
.defaultIsIndex = 1, |
145 |
.defaultSupportSaved = 1, |
.defaultSupportSaved = 1, |
146 |
.entrySeparator = LT_TITLE, |
.entryStart = LT_TITLE, |
147 |
.needsBootPrefix = 1, |
.needsBootPrefix = 1, |
148 |
.mbHyperFirst = 1, |
.mbHyperFirst = 1, |
149 |
.mbInitRdIsModule = 1, |
.mbInitRdIsModule = 1, |
247 |
struct configFileInfo eliloConfigType = { |
struct configFileInfo eliloConfigType = { |
248 |
.defaultConfig = "/boot/efi/EFI/redhat/elilo.conf", |
.defaultConfig = "/boot/efi/EFI/redhat/elilo.conf", |
249 |
.keywords = eliloKeywords, |
.keywords = eliloKeywords, |
250 |
.entrySeparator = LT_KERNEL, |
.entryStart = LT_KERNEL, |
251 |
.needsBootPrefix = 1, |
.needsBootPrefix = 1, |
252 |
.argsInQuotes = 1, |
.argsInQuotes = 1, |
253 |
.mbConcatArgs = 1, |
.mbConcatArgs = 1, |
256 |
struct configFileInfo liloConfigType = { |
struct configFileInfo liloConfigType = { |
257 |
.defaultConfig = "/etc/lilo.conf", |
.defaultConfig = "/etc/lilo.conf", |
258 |
.keywords = liloKeywords, |
.keywords = liloKeywords, |
259 |
.entrySeparator = LT_KERNEL, |
.entryStart = LT_KERNEL, |
260 |
.argsInQuotes = 1, |
.argsInQuotes = 1, |
261 |
.maxTitleLength = 15, |
.maxTitleLength = 15, |
262 |
}; |
}; |
264 |
struct configFileInfo yabootConfigType = { |
struct configFileInfo yabootConfigType = { |
265 |
.defaultConfig = "/etc/yaboot.conf", |
.defaultConfig = "/etc/yaboot.conf", |
266 |
.keywords = yabootKeywords, |
.keywords = yabootKeywords, |
267 |
.entrySeparator = LT_KERNEL, |
.entryStart = LT_KERNEL, |
268 |
.needsBootPrefix = 1, |
.needsBootPrefix = 1, |
269 |
.argsInQuotes = 1, |
.argsInQuotes = 1, |
270 |
.maxTitleLength = 15, |
.maxTitleLength = 15, |
274 |
struct configFileInfo siloConfigType = { |
struct configFileInfo siloConfigType = { |
275 |
.defaultConfig = "/etc/silo.conf", |
.defaultConfig = "/etc/silo.conf", |
276 |
.keywords = siloKeywords, |
.keywords = siloKeywords, |
277 |
.entrySeparator = LT_KERNEL, |
.entryStart = LT_KERNEL, |
278 |
.needsBootPrefix = 1, |
.needsBootPrefix = 1, |
279 |
.argsInQuotes = 1, |
.argsInQuotes = 1, |
280 |
.maxTitleLength = 15, |
.maxTitleLength = 15, |
283 |
struct configFileInfo ziplConfigType = { |
struct configFileInfo ziplConfigType = { |
284 |
.defaultConfig = "/etc/zipl.conf", |
.defaultConfig = "/etc/zipl.conf", |
285 |
.keywords = ziplKeywords, |
.keywords = ziplKeywords, |
286 |
.entrySeparator = LT_TITLE, |
.entryStart = LT_TITLE, |
287 |
.argsInQuotes = 1, |
.argsInQuotes = 1, |
288 |
.titleBracketed = 1, |
.titleBracketed = 1, |
289 |
}; |
}; |
291 |
struct configFileInfo extlinuxConfigType = { |
struct configFileInfo extlinuxConfigType = { |
292 |
.defaultConfig = "/boot/extlinux/extlinux.conf", |
.defaultConfig = "/boot/extlinux/extlinux.conf", |
293 |
.keywords = extlinuxKeywords, |
.keywords = extlinuxKeywords, |
294 |
.entrySeparator = LT_TITLE, |
.entryStart = LT_TITLE, |
295 |
.needsBootPrefix = 1, |
.needsBootPrefix = 1, |
296 |
.maxTitleLength = 255, |
.maxTitleLength = 255, |
297 |
.mbAllowExtraInitRds = 1, |
.mbAllowExtraInitRds = 1, |
437 |
return 0; |
return 0; |
438 |
} |
} |
439 |
|
|
440 |
static int isEntrySeparator(struct singleLine * line, |
static int isEntryStart(struct singleLine * line, |
441 |
struct configFileInfo * cfi) { |
struct configFileInfo * cfi) { |
442 |
return line->type == cfi->entrySeparator || line->type == LT_OTHER || |
return line->type == cfi->entryStart || line->type == LT_OTHER || |
443 |
(cfi->titleBracketed && isBracketedTitle(line)); |
(cfi->titleBracketed && isBracketedTitle(line)); |
444 |
} |
} |
445 |
|
|
762 |
cfg->secondaryIndent = strdup(line->indent); |
cfg->secondaryIndent = strdup(line->indent); |
763 |
} |
} |
764 |
|
|
765 |
if (isEntrySeparator(line, cfi)) { |
if (isEntryStart(line, cfi)) { |
766 |
sawEntry = 1; |
sawEntry = 1; |
767 |
if (!entry) { |
if (!entry) { |
768 |
cfg->entries = malloc(sizeof(*entry)); |
cfg->entries = malloc(sizeof(*entry)); |
2673 |
/* don't have a template, so start the entry with the |
/* don't have a template, so start the entry with the |
2674 |
* appropriate starting line |
* appropriate starting line |
2675 |
*/ |
*/ |
2676 |
switch (config->cfi->entrySeparator) { |
switch (config->cfi->entryStart) { |
2677 |
case LT_KERNEL: |
case LT_KERNEL: |
2678 |
if (new->multiboot && config->cfi->mbHyperFirst) { |
if (new->multiboot && config->cfi->mbHyperFirst) { |
2679 |
/* fall through to LT_HYPER */ |
/* fall through to LT_HYPER */ |
2725 |
|
|
2726 |
/* add the remainder of the lines, i.e. those that either |
/* add the remainder of the lines, i.e. those that either |
2727 |
* weren't present in the template, or in the case of no template, |
* weren't present in the template, or in the case of no template, |
2728 |
* all the lines following the entrySeparator. |
* all the lines following the entryStart. |
2729 |
*/ |
*/ |
2730 |
if (needs & NEED_TITLE) { |
if (needs & NEED_TITLE) { |
2731 |
newLine = addLine(new, config->cfi, LT_TITLE, |
newLine = addLine(new, config->cfi, LT_TITLE, |