Magellan Linux

Diff of /trunk/grubby/grubby.c

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

revision 2700 by niro, Wed Jul 16 10:52:01 2014 UTC revision 2709 by niro, Wed Jul 16 10:57:06 2014 UTC
# Line 2276  void displayEntry(struct singleEntry * e Line 2276  void displayEntry(struct singleEntry * e
2276      struct singleLine * line;      struct singleLine * line;
2277      char * root = NULL;      char * root = NULL;
2278      int i;      int i;
2279        int j;
2280    
2281      printf("index=%d\n", index);      printf("index=%d\n", index);
2282    
# Line 2367  void displayEntry(struct singleEntry * e Line 2368  void displayEntry(struct singleEntry * e
2368   if (title)   if (title)
2369      printf("title=%s\n", title);      printf("title=%s\n", title);
2370      }      }
2371    
2372        for (j = 0, line = entry->lines; line; line = line->next) {
2373     if ((line->type & LT_MBMODULE) && line->numElements >= 2) {
2374        if (!strncmp(prefix, line->elements[1].item, strlen(prefix)))
2375     printf("mbmodule%d=", j);
2376        else
2377     printf("mbmodule%d=%s", j, prefix);
2378    
2379        for (i = 1; i < line->numElements; i++)
2380     printf("%s%s", line->elements[i].item, line->elements[i].indent);
2381        printf("\n");
2382        j++;
2383     }
2384        }
2385  }  }
2386    
2387  int isSuseSystem(void) {  int isSuseSystem(void) {
# Line 4038  int addNewKernel(struct grubConfig * con Line 4053  int addNewKernel(struct grubConfig * con
4053   }   }
4054      }      }
4055    
4056        struct singleLine *endLine = NULL;
4057        endLine = getLineByType(LT_ENTRY_END, new->lines);
4058        if (endLine) {
4059        removeLine(new, endLine);
4060        needs |= NEED_END;
4061        }
4062    
4063      /* add the remainder of the lines, i.e. those that either      /* add the remainder of the lines, i.e. those that either
4064       * 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,
4065       * all the lines following the entryStart.       * all the lines following the entryStart.
# Line 4096  int addNewKernel(struct grubConfig * con Line 4118  int addNewKernel(struct grubConfig * con
4118   config->secondaryIndent, NULL);   config->secondaryIndent, NULL);
4119   needs &= ~NEED_END;   needs &= ~NEED_END;
4120      }      }
4121    
4122      if (needs) {      if (needs) {
4123   printf(_("grubby: needs=%d, aborting\n"), needs);   printf(_("grubby: needs=%d, aborting\n"), needs);
4124   abort();   abort();

Legend:
Removed from v.2700  
changed lines
  Added in v.2709