summaryrefslogtreecommitdiffhomepage
path: root/e2fsprogs/fsck.c
diff options
context:
space:
mode:
author"Vladimir N. Oleynik" <dzo@simtreas.ru>2005-10-12 16:22:19 +0000
committer"Vladimir N. Oleynik" <dzo@simtreas.ru>2005-10-12 16:22:19 +0000
commitd20cfbd3034ad41c0d99e7578156389f385c7340 (patch)
treeb6fa54ac8c77c11156f4f214a0cda7ab3c318a45 /e2fsprogs/fsck.c
parent6c35c7c97628cb81eb26c2a059b0dde2879d91aa (diff)
create e2fs_set_sbin_path(), noticed by Tito, Thanks
Diffstat (limited to 'e2fsprogs/fsck.c')
-rw-r--r--e2fsprogs/fsck.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/e2fsprogs/fsck.c b/e2fsprogs/fsck.c
index 7799faec0..36eebf2c5 100644
--- a/e2fsprogs/fsck.c
+++ b/e2fsprogs/fsck.c
@@ -282,7 +282,6 @@ static int kill_sent;
static char *fstype;
static struct fs_info *filesys_info, *filesys_last;
static struct fsck_instance *instance_list;
-static const char *fsck_prefix_path = "/sbin:/sbin/fs.d:/sbin/fs:/etc/fs:/etc";
static char *fsck_path;
static blkid_cache cache;
@@ -1349,7 +1348,6 @@ int fsck_main(int argc, char *argv[])
{
int i, status = 0;
int interactive = 0;
- char *oldpath = getenv("PATH");
const char *fstab;
struct fs_info *fs;
@@ -1367,12 +1365,7 @@ int fsck_main(int argc, char *argv[])
fstab = _PATH_MNTTAB;
load_fs_info(fstab);
- /* Update our search path to include uncommon directories. */
- if (oldpath) {
- fsck_path = bb_xasprintf("%s:%s", fsck_prefix_path, oldpath);
- } else {
- fsck_path = string_copy(fsck_prefix_path);
- }
+ e2fs_set_sbin_path();
if ((num_devices == 1) || (serialize))
interactive = 1;