Magellan Linux

Diff of /tags/grubby-8_32/grubby.c

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

revision 2052 by niro, Wed Feb 20 14:00:54 2013 UTC revision 2058 by niro, Wed Feb 20 14:06:30 2013 UTC
# Line 138  struct configFileInfo { Line 138  struct configFileInfo {
138      findConfigFunc findConfig;      findConfigFunc findConfig;
139      writeLineFunc writeLine;      writeLineFunc writeLine;
140      struct keywordTypes * keywords;      struct keywordTypes * keywords;
141        int caseInsensitive;
142      int defaultIsIndex;      int defaultIsIndex;
143      int defaultIsVariable;      int defaultIsVariable;
144      int defaultSupportSaved;      int defaultSupportSaved;
# Line 496  struct configFileInfo ziplConfigType = { Line 497  struct configFileInfo ziplConfigType = {
497  struct configFileInfo extlinuxConfigType = {  struct configFileInfo extlinuxConfigType = {
498      .defaultConfig = "/boot/extlinux/extlinux.conf",      .defaultConfig = "/boot/extlinux/extlinux.conf",
499      .keywords = extlinuxKeywords,      .keywords = extlinuxKeywords,
500        .caseInsensitive = 1,
501      .entryStart = LT_TITLE,      .entryStart = LT_TITLE,
502      .needsBootPrefix = 1,      .needsBootPrefix = 1,
503      .maxTitleLength = 255,      .maxTitleLength = 255,
# Line 632  static char * getuuidbydev(char *device) Line 634  static char * getuuidbydev(char *device)
634  static enum lineType_e getTypeByKeyword(char * keyword,  static enum lineType_e getTypeByKeyword(char * keyword,
635   struct configFileInfo * cfi) {   struct configFileInfo * cfi) {
636      for (struct keywordTypes *kw = cfi->keywords; kw->key; kw++) {      for (struct keywordTypes *kw = cfi->keywords; kw->key; kw++) {
637   if (!strcmp(keyword, kw->key))   if (cfi->caseInsensitive) {
638      return kw->type;      if (!strcasecmp(keyword, kw->key))
639                    return kw->type;
640     } else {
641        if (!strcmp(keyword, kw->key))
642            return kw->type;
643     }
644      }      }
645      return LT_UNKNOWN;      return LT_UNKNOWN;
646  }  }
# Line 3750  static void traceback(int signum) Line 3757  static void traceback(int signum)
3757      memset(array, '\0', sizeof (array));      memset(array, '\0', sizeof (array));
3758      size = backtrace(array, 40);      size = backtrace(array, 40);
3759    
3760      fprintf(stderr, "grubby recieved SIGSEGV!  Backtrace (%ld):\n",      fprintf(stderr, "grubby received SIGSEGV!  Backtrace (%ld):\n",
3761              (unsigned long)size);              (unsigned long)size);
3762      backtrace_symbols_fd(array, size, STDERR_FILENO);      backtrace_symbols_fd(array, size, STDERR_FILENO);
3763      exit(1);      exit(1);
# Line 3848  int main(int argc, const char ** argv) { Line 3855  int main(int argc, const char ** argv) {
3855   { "initrd", 0, POPT_ARG_STRING, &newKernelInitrd, 0,   { "initrd", 0, POPT_ARG_STRING, &newKernelInitrd, 0,
3856      _("initrd image for the new kernel"), _("initrd-path") },      _("initrd image for the new kernel"), _("initrd-path") },
3857   { "extra-initrd", 'i', POPT_ARG_STRING, NULL, 'i',   { "extra-initrd", 'i', POPT_ARG_STRING, NULL, 'i',
3858      _("auxilliary initrd image for things other than the new kernel"), _("initrd-path") },      _("auxiliary initrd image for things other than the new kernel"), _("initrd-path") },
3859   { "lilo", 0, POPT_ARG_NONE, &configureLilo, 0,   { "lilo", 0, POPT_ARG_NONE, &configureLilo, 0,
3860      _("configure lilo bootloader") },      _("configure lilo bootloader") },
3861   { "make-default", 0, 0, &makeDefault, 0,   { "make-default", 0, 0, &makeDefault, 0,

Legend:
Removed from v.2052  
changed lines
  Added in v.2058