Magellan Linux

Diff of /trunk/grubby/grubby.c

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

revision 3007 by niro, Tue Jun 27 14:28:28 2017 UTC revision 3014 by niro, Tue Jun 27 14:34:11 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    
# Line 4783  int main(int argc, const char **argv) Line 4789  int main(int argc, const char **argv)
4789   NULL},   NULL},
4790   {"boot-filesystem", 0, POPT_ARG_STRING, &bootPrefix, 0,   {"boot-filesystem", 0, POPT_ARG_STRING, &bootPrefix, 0,
4791   _   _
4792   ("filestystem which contains /boot directory (for testing only)"),   ("filesystem which contains /boot directory (for testing only)"),
4793   _("bootfs")},   _("bootfs")},
4794  #if defined(__i386__) || defined(__x86_64__) || defined (__powerpc64__) || defined (__ia64__)  #if defined(__i386__) || defined(__x86_64__) || defined (__powerpc64__) || defined (__ia64__)
4795   {"bootloader-probe", 0, POPT_ARG_NONE, &bootloaderProbe, 0,   {"bootloader-probe", 0, POPT_ARG_NONE, &bootloaderProbe, 0,

Legend:
Removed from v.3007  
changed lines
  Added in v.3014