Magellan Linux

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

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

revision 1866 by niro, Mon Jul 2 13:21:25 2012 UTC revision 1868 by niro, Mon Jul 2 13:22:30 2012 UTC
# Line 1310  static int writeConfig(struct grubConfig Line 1310  static int writeConfig(struct grubConfig
1310    
1311      /* most likely the symlink is relative, so change our      /* most likely the symlink is relative, so change our
1312         directory to the dir of the symlink */         directory to the dir of the symlink */
1313              rc = chdir(dirname(strdupa(outName)));      char *dir = strdupa(outName);
1314                rc = chdir(dirname(dir));
1315        free(dir);
1316      do {      do {
1317   buf = alloca(len + 1);   buf = alloca(len + 1);
1318   rc = readlink(basename(outName), buf, len);   rc = readlink(basename(outName), buf, len);

Legend:
Removed from v.1866  
changed lines
  Added in v.1868