Magellan Linux

Diff of /trunk/grubby/grubby.c

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

revision 3009 by niro, Tue Jun 27 14:28:28 2017 UTC revision 3010 by niro, Tue Jun 27 14:30:29 2017 UTC
# Line 4215  int addNewKernel(struct grubConfig *conf Line 4215  int addNewKernel(struct grubConfig *conf
4215   struct singleEntry *new, *entry, *prev = NULL;   struct singleEntry *new, *entry, *prev = NULL;
4216   struct singleLine *newLine = NULL, *tmplLine = NULL, *masterLine = NULL;   struct singleLine *newLine = NULL, *tmplLine = NULL, *masterLine = NULL;
4217   int needs;   int needs;
4218     char *indexs;
4219   char *chptr;   char *chptr;
4220     int rc;
4221    
4222   if (!newKernelPath)   if (!newKernelPath)
4223   return 0;   return 0;
4224    
4225     rc = asprintf(&indexs, "%d", newIndex);
4226     if (rc < 0)
4227     return 1;
4228    
4229   /* if the newKernelTitle is too long silently munge it into something   /* if the newKernelTitle is too long silently munge it into something
4230   * we can live with. truncating is first check, then we'll just mess with   * we can live with. truncating is first check, then we'll just mess with
4231   * it until it looks better */   * it until it looks better */
# Line 4718  int addNewKernel(struct grubConfig *conf Line 4724  int addNewKernel(struct grubConfig *conf
4724   abort();   abort();
4725   }   }
4726    
4727   if (updateImage(config, "0", prefix, newKernelArgs, NULL,   if (updateImage(config, indexs, prefix, newKernelArgs, NULL,
4728   newMBKernelArgs, NULL))   newMBKernelArgs, NULL))
4729   return 1;   return 1;
4730    

Legend:
Removed from v.3009  
changed lines
  Added in v.3010