fstab = _PATH_MNTTAB;
load_fs_info(fstab);
- e2fs_set_sbin_path();
+ fsck_path = e2fs_set_sbin_path();
if ((num_devices == 1) || (serialize))
interactive = 1;
}
}
status |= wait_many(FLAG_WAIT_ALL);
- if (ENABLE_FEATURE_CLEAN_UP)
- free(fsck_path);
blkid_put_cache(cache);
return status;
}
#define FSCK_CANCELED 32 /* Aborted with a signal or ^C */
#define EXIT_LIBRARY 128
-extern void e2fs_set_sbin_path(void);
+extern char *e2fs_set_sbin_path(void);
puts("done");
}
-void e2fs_set_sbin_path(void)
+char *e2fs_set_sbin_path(void)
{
char *oldpath = getenv("PATH");
/* Update our PATH to include /sbin */
#define PATH_SET "/sbin"
- if (oldpath)
- putenv (bb_xasprintf("%s:%s", PATH_SET, oldpath));
- else
- putenv (PATH_SET);
+ if (oldpath)
+ oldpath = bb_xasprintf("%s:%s", PATH_SET, oldpath);
+ else
+ oldpath = PATH_SET;
+ putenv (oldpath);
+ return oldpath;
}
extern void print_check_message(ext2_filsys fs);
extern void make_journal_device(char *journal_device, ext2_filsys fs, int quiet, int force);
extern void make_journal_blocks(ext2_filsys fs, int journal_size, int journal_flags, int quiet);
-extern void e2fs_set_sbin_path(void);
+extern char *e2fs_set_sbin_path(void);