summaryrefslogtreecommitdiff
path: root/e2fsprogs/util.c
diff options
context:
space:
mode:
author"Vladimir N. Oleynik"2005-11-26 11:01:23 +0000
committer"Vladimir N. Oleynik"2005-11-26 11:01:23 +0000
commit350865e33979bdd2a5005939c214fb3d9f4bbc9d (patch)
tree3d0e96bc755a206854eb7e979e76372f0232a97b /e2fsprogs/util.c
parentcc34344d91cea789edde507bf85714af11daea71 (diff)
downloadbusybox-350865e33979bdd2a5005939c214fb3d9f4bbc9d.zip
busybox-350865e33979bdd2a5005939c214fb3d9f4bbc9d.tar.gz
remove bug: fsck do not know path
Diffstat (limited to 'e2fsprogs/util.c')
-rw-r--r--e2fsprogs/util.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/e2fsprogs/util.c b/e2fsprogs/util.c
index e59b18c..7e9c092 100644
--- a/e2fsprogs/util.c
+++ b/e2fsprogs/util.c
@@ -254,13 +254,15 @@ void make_journal_blocks(ext2_filsys fs, int journal_size, int journal_flags, in
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;
}