Magellan Linux

Diff of /trunk/grubby/grubby.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3028 by niro, Tue Jun 27 14:45:42 2017 UTC revision 3029 by niro, Tue Jun 27 14:46:56 2017 UTC
# Line 2687  void setFallbackImage(struct grubConfig Line 2687  void setFallbackImage(struct grubConfig
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;
# Line 2783  void displayEntry(struct singleEntry *en Line 2783  void displayEntry(struct singleEntry *en
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);
# Line 3199  int displayInfo(struct grubConfig *confi Line 3206  int displayInfo(struct grubConfig *confi
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    

Legend:
Removed from v.3028  
changed lines
  Added in v.3029