Magellan Linux

Diff of /trunk/grubby/grubby.c

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

revision 2681 by niro, Mon Oct 21 14:08:21 2013 UTC revision 2682 by niro, Wed Jul 16 09:49:24 2014 UTC
# Line 275  static char *grub2GetEnv(struct configFi Line 275  static char *grub2GetEnv(struct configFi
275      static char buf[1025];      static char buf[1025];
276      char *s = NULL;      char *s = NULL;
277      char *ret = NULL;      char *ret = NULL;
278      char *envFile = info->envFile ? info->envFile : "/boot/grub2/grubenv";      char *envFile = info->envFile ? info->envFile : "/boot/grub/grubenv";
279      int rc = asprintf(&s, "grub2-editenv %s list | grep '^%s='", envFile, name);      int rc = asprintf(&s, "grub-editenv %s list | grep '^%s='", envFile, name);
280    
281      if (rc < 0)      if (rc < 0)
282   return NULL;   return NULL;
# Line 340  static int grub2SetEnv(struct configFile Line 340  static int grub2SetEnv(struct configFile
340  {  {
341      char *s = NULL;      char *s = NULL;
342      int rc = 0;      int rc = 0;
343      char *envFile = info->envFile ? info->envFile : "/boot/grub2/grubenv";      char *envFile = info->envFile ? info->envFile : "/boot/grub/grubenv";
344    
345      unquote(value);      unquote(value);
346      value = shellEscape(value);      value = shellEscape(value);
347      if (!value)      if (!value)
348      return -1;      return -1;
349    
350      rc = asprintf(&s, "grub2-editenv %s set '%s=%s'", envFile, name, value);      rc = asprintf(&s, "grub-editenv %s set '%s=%s'", envFile, name, value);
351      free(value);      free(value);
352      if (rc <0)      if (rc <0)
353   return -1;   return -1;

Legend:
Removed from v.2681  
changed lines
  Added in v.2682