2687 |
} |
} |
2688 |
} |
} |
2689 |
|
|
2690 |
void displayEntry(struct singleEntry *entry, const char *prefix, int index) |
void displayEntry(struct grubConfig *config, struct singleEntry *entry, const char *prefix, int index) |
2691 |
{ |
{ |
2692 |
struct singleLine *line; |
struct singleLine *line; |
2693 |
char *root = NULL; |
char *root = NULL; |
2783 |
|
|
2784 |
line = getLineByType(LT_TITLE, entry->lines); |
line = getLineByType(LT_TITLE, entry->lines); |
2785 |
if (line) { |
if (line) { |
2786 |
printf("title=%s\n", line->elements[1].item); |
char *entryTitle; |
2787 |
|
/* if we can extractTitle, then it's a zipl config and |
2788 |
|
* if not then we go ahead with what's existed prior */ |
2789 |
|
entryTitle = extractTitle(config, line); |
2790 |
|
if (!entryTitle) { |
2791 |
|
entryTitle=line->elements[1].item; |
2792 |
|
} |
2793 |
|
printf("title=%s\n", entryTitle); |
2794 |
} else { |
} else { |
2795 |
char *title; |
char *title; |
2796 |
line = getLineByType(LT_MENUENTRY, entry->lines); |
line = getLineByType(LT_MENUENTRY, entry->lines); |
3206 |
printf("lba\n"); |
printf("lba\n"); |
3207 |
} |
} |
3208 |
|
|
3209 |
displayEntry(entry, prefix, i); |
displayEntry(config, entry, prefix, i); |
3210 |
|
|
3211 |
i++; |
i++; |
3212 |
while ((entry = findEntryByPath(config, kernel, prefix, &i))) { |
while ((entry = findEntryByPath(config, kernel, prefix, &i))) { |
3213 |
displayEntry(entry, prefix, i); |
displayEntry(config, entry, prefix, i); |
3214 |
i++; |
i++; |
3215 |
} |
} |
3216 |
|
|