From d20cfbd3034ad41c0d99e7578156389f385c7340 Mon Sep 17 00:00:00 2001 From: "\"Vladimir N. Oleynik\"" Date: Wed, 12 Oct 2005 16:22:19 +0000 Subject: create e2fs_set_sbin_path(), noticed by Tito, Thanks --- e2fsprogs/mke2fs.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'e2fsprogs/mke2fs.c') diff --git a/e2fsprogs/mke2fs.c b/e2fsprogs/mke2fs.c index ab50717e7..9c4f1c4d0 100644 --- a/e2fsprogs/mke2fs.c +++ b/e2fsprogs/mke2fs.c @@ -685,8 +685,6 @@ static int set_os(struct ext2_super_block *sb, char *os) return 0; } -#define PATH_SET "PATH=/sbin" - static void parse_extended_opts(struct ext2_super_block *sb_param, const char *opts) { @@ -801,17 +799,13 @@ static int PRS(int argc, char *argv[]) int show_version_only = 0; ext2_ino_t num_inodes = 0; errcode_t retval; - char * oldpath = getenv("PATH"); char * extended_opts = 0; const char * fs_type = 0; blk_t dev_size; long sysval; /* Update our PATH to include /sbin */ - if (oldpath) { - putenv (bb_xasprintf("%s:%s", PATH_SET, oldpath)); - } else - putenv (PATH_SET); + e2fs_set_sbin_path(); tmp = getenv("MKE2FS_SYNC"); if (tmp) -- cgit v1.2.3