139 |
}; |
}; |
140 |
|
|
141 |
struct configFileInfo grubConfigType = { |
struct configFileInfo grubConfigType = { |
142 |
"/boot/grub/grub.conf", /* defaultConfig */ |
.defaultConfig = "/boot/grub/grub.conf", |
143 |
grubKeywords, /* keywords */ |
.keywords = grubKeywords, |
144 |
1, /* defaultIsIndex */ |
.defaultIsIndex = 1, |
145 |
1, /* defaultSupportSaved */ |
.defaultSupportSaved = 1, |
146 |
LT_TITLE, /* entrySeparator */ |
.entrySeparator = LT_TITLE, |
147 |
1, /* needsBootPrefix */ |
.needsBootPrefix = 1, |
148 |
0, /* argsInQuotes */ |
.mbHyperFirst = 1, |
149 |
0, /* maxTitleLength */ |
.mbInitRdIsModule = 1, |
150 |
0, /* titleBracketed */ |
.mbAllowExtraInitRds = 1, |
|
1, /* mbHyperFirst */ |
|
|
1, /* mbInitRdIsModule */ |
|
|
0, /* mbConcatArgs */ |
|
|
1, /* mbAllowExtraInitRds */ |
|
151 |
}; |
}; |
152 |
|
|
153 |
struct keywordTypes yabootKeywords[] = { |
struct keywordTypes yabootKeywords[] = { |
245 |
}; |
}; |
246 |
int useextlinuxmenu; |
int useextlinuxmenu; |
247 |
struct configFileInfo eliloConfigType = { |
struct configFileInfo eliloConfigType = { |
248 |
"/boot/efi/EFI/redhat/elilo.conf", /* defaultConfig */ |
.defaultConfig = "/boot/efi/EFI/redhat/elilo.conf", |
249 |
eliloKeywords, /* keywords */ |
.keywords = eliloKeywords, |
250 |
0, /* defaultIsIndex */ |
.entrySeparator = LT_KERNEL, |
251 |
0, /* defaultSupportSaved */ |
.needsBootPrefix = 1, |
252 |
LT_KERNEL, /* entrySeparator */ |
.argsInQuotes = 1, |
253 |
1, /* needsBootPrefix */ |
.mbConcatArgs = 1, |
|
1, /* argsInQuotes */ |
|
|
0, /* maxTitleLength */ |
|
|
0, /* titleBracketed */ |
|
|
0, /* mbHyperFirst */ |
|
|
0, /* mbInitRdIsModule */ |
|
|
1, /* mbConcatArgs */ |
|
|
0, /* mbAllowExtraInitRds */ |
|
254 |
}; |
}; |
255 |
|
|
256 |
struct configFileInfo liloConfigType = { |
struct configFileInfo liloConfigType = { |
257 |
"/etc/lilo.conf", /* defaultConfig */ |
.defaultConfig = "/etc/lilo.conf", |
258 |
liloKeywords, /* keywords */ |
.keywords = liloKeywords, |
259 |
0, /* defaultIsIndex */ |
.entrySeparator = LT_KERNEL, |
260 |
0, /* defaultSupportSaved */ |
.argsInQuotes = 1, |
261 |
LT_KERNEL, /* entrySeparator */ |
.maxTitleLength = 15, |
|
0, /* needsBootPrefix */ |
|
|
1, /* argsInQuotes */ |
|
|
15, /* maxTitleLength */ |
|
|
0, /* titleBracketed */ |
|
|
0, /* mbHyperFirst */ |
|
|
0, /* mbInitRdIsModule */ |
|
|
0, /* mbConcatArgs */ |
|
|
0, /* mbAllowExtraInitRds */ |
|
262 |
}; |
}; |
263 |
|
|
264 |
struct configFileInfo yabootConfigType = { |
struct configFileInfo yabootConfigType = { |
265 |
"/etc/yaboot.conf", /* defaultConfig */ |
.defaultConfig = "/etc/yaboot.conf", |
266 |
yabootKeywords, /* keywords */ |
.keywords = yabootKeywords, |
267 |
0, /* defaultIsIndex */ |
.entrySeparator = LT_KERNEL, |
268 |
0, /* defaultSupportSaved */ |
.needsBootPrefix = 1, |
269 |
LT_KERNEL, /* entrySeparator */ |
.argsInQuotes = 1, |
270 |
1, /* needsBootPrefix */ |
.maxTitleLength = 15, |
271 |
1, /* argsInQuotes */ |
.mbAllowExtraInitRds = 1, |
|
15, /* maxTitleLength */ |
|
|
0, /* titleBracketed */ |
|
|
0, /* mbHyperFirst */ |
|
|
0, /* mbInitRdIsModule */ |
|
|
0, /* mbConcatArgs */ |
|
|
1, /* mbAllowExtraInitRds */ |
|
272 |
}; |
}; |
273 |
|
|
274 |
struct configFileInfo siloConfigType = { |
struct configFileInfo siloConfigType = { |
275 |
"/etc/silo.conf", /* defaultConfig */ |
.defaultConfig = "/etc/silo.conf", |
276 |
siloKeywords, /* keywords */ |
.keywords = siloKeywords, |
277 |
0, /* defaultIsIndex */ |
.entrySeparator = LT_KERNEL, |
278 |
0, /* defaultSupportSaved */ |
.needsBootPrefix = 1, |
279 |
LT_KERNEL, /* entrySeparator */ |
.argsInQuotes = 1, |
280 |
1, /* needsBootPrefix */ |
.maxTitleLength = 15, |
|
1, /* argsInQuotes */ |
|
|
15, /* maxTitleLength */ |
|
|
0, /* titleBracketed */ |
|
|
0, /* mbHyperFirst */ |
|
|
0, /* mbInitRdIsModule */ |
|
|
0, /* mbConcatArgs */ |
|
|
0, /* mbAllowExtraInitRds */ |
|
281 |
}; |
}; |
282 |
|
|
283 |
struct configFileInfo ziplConfigType = { |
struct configFileInfo ziplConfigType = { |
284 |
"/etc/zipl.conf", /* defaultConfig */ |
.defaultConfig = "/etc/zipl.conf", |
285 |
ziplKeywords, /* keywords */ |
.keywords = ziplKeywords, |
286 |
0, /* defaultIsIndex */ |
.entrySeparator = LT_TITLE, |
287 |
0, /* defaultSupportSaved */ |
.argsInQuotes = 1, |
288 |
LT_TITLE, /* entrySeparator */ |
.titleBracketed = 1, |
|
0, /* needsBootPrefix */ |
|
|
1, /* argsInQuotes */ |
|
|
0, /* maxTitleLength */ |
|
|
1, /* titleBracketed */ |
|
|
0, /* mbHyperFirst */ |
|
|
0, /* mbInitRdIsModule */ |
|
|
0, /* mbConcatArgs */ |
|
|
0, /* mbAllowExtraInitRds */ |
|
289 |
}; |
}; |
290 |
|
|
291 |
struct configFileInfo extlinuxConfigType = { |
struct configFileInfo extlinuxConfigType = { |
292 |
"/boot/extlinux/extlinux.conf", /* defaultConfig */ |
.defaultConfig = "/boot/extlinux/extlinux.conf", |
293 |
extlinuxKeywords, /* keywords */ |
.keywords = extlinuxKeywords, |
294 |
0, /* defaultIsIndex */ |
.entrySeparator = LT_TITLE, |
295 |
0, /* defaultSupportSaved */ |
.needsBootPrefix = 1, |
296 |
LT_TITLE, /* entrySeparator */ |
.maxTitleLength = 255, |
297 |
1, /* needsBootPrefix */ |
.mbAllowExtraInitRds = 1, |
|
0, /* argsInQuotes */ |
|
|
255, /* maxTitleLength */ |
|
|
0, /* titleBracketed */ |
|
|
0, /* mbHyperFirst */ |
|
|
0, /* mbInitRdIsModule */ |
|
|
0, /* mbConcatArgs */ |
|
|
1, /* mbAllowExtraInitRds */ |
|
298 |
}; |
}; |
299 |
|
|
300 |
struct grubConfig { |
struct grubConfig { |
1246 |
if (!rootdev) |
if (!rootdev) |
1247 |
return 0; |
return 0; |
1248 |
|
|
1249 |
|
if (!getuuidbydev(rootdev) || !getuuidbydev(dev)) { |
1250 |
|
free(rootdev); |
1251 |
|
return 0; |
1252 |
|
} |
1253 |
|
|
1254 |
if (strcmp(getuuidbydev(rootdev), getuuidbydev(dev))) { |
if (strcmp(getuuidbydev(rootdev), getuuidbydev(dev))) { |
1255 |
free(rootdev); |
free(rootdev); |
1932 |
const char ** arg; |
const char ** arg; |
1933 |
int useKernelArgs, useRoot; |
int useKernelArgs, useRoot; |
1934 |
int firstElement; |
int firstElement; |
1935 |
int *usedElements, *usedArgs; |
int *usedElements; |
1936 |
int doreplace; |
int doreplace; |
1937 |
|
|
1938 |
if (!image) return 0; |
if (!image) return 0; |
1967 |
useRoot = (getKeywordByType(LT_ROOT, cfg->cfi) |
useRoot = (getKeywordByType(LT_ROOT, cfg->cfi) |
1968 |
&& !multibootArgs); |
&& !multibootArgs); |
1969 |
|
|
|
for (k = 0, arg = newArgs; *arg; arg++, k++) ; |
|
|
usedArgs = calloc(k, sizeof(*usedArgs)); |
|
|
|
|
1970 |
for (; (entry = findEntryByPath(cfg, image, prefix, &index)); index++) { |
for (; (entry = findEntryByPath(cfg, image, prefix, &index)); index++) { |
1971 |
|
|
1972 |
if (multibootArgs && !entry->multiboot) |
if (multibootArgs && !entry->multiboot) |
2042 |
usedElements = calloc(line->numElements, sizeof(*usedElements)); |
usedElements = calloc(line->numElements, sizeof(*usedElements)); |
2043 |
|
|
2044 |
for (k = 0, arg = newArgs; *arg; arg++, k++) { |
for (k = 0, arg = newArgs; *arg; arg++, k++) { |
|
if (usedArgs[k]) continue; |
|
2045 |
|
|
2046 |
doreplace = 1; |
doreplace = 1; |
2047 |
for (i = firstElement; i < line->numElements; i++) { |
for (i = firstElement; i < line->numElements; i++) { |
2056 |
continue; |
continue; |
2057 |
if (!argMatch(line->elements[i].item, *arg)) { |
if (!argMatch(line->elements[i].item, *arg)) { |
2058 |
usedElements[i]=1; |
usedElements[i]=1; |
|
usedArgs[k]=1; |
|
2059 |
break; |
break; |
2060 |
} |
} |
2061 |
} |
} |
2125 |
} |
} |
2126 |
} |
} |
2127 |
|
|
|
free(usedArgs); |
|
2128 |
free(newArgs); |
free(newArgs); |
2129 |
free(oldArgs); |
free(oldArgs); |
2130 |
|
|