summaryrefslogtreecommitdiff
path: root/e2fsprogs/util.c
diff options
context:
space:
mode:
author"Vladimir N. Oleynik"2005-10-12 16:22:19 +0000
committer"Vladimir N. Oleynik"2005-10-12 16:22:19 +0000
commitd20cfbd3034ad41c0d99e7578156389f385c7340 (patch)
treeb6fa54ac8c77c11156f4f214a0cda7ab3c318a45 /e2fsprogs/util.c
parent6c35c7c97628cb81eb26c2a059b0dde2879d91aa (diff)
downloadbusybox-d20cfbd3034ad41c0d99e7578156389f385c7340.zip
busybox-d20cfbd3034ad41c0d99e7578156389f385c7340.tar.gz
create e2fs_set_sbin_path(), noticed by Tito, Thanks
Diffstat (limited to 'e2fsprogs/util.c')
-rw-r--r--e2fsprogs/util.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/e2fsprogs/util.c b/e2fsprogs/util.c
index 58f9bbb..e59b18c 100644
--- a/e2fsprogs/util.c
+++ b/e2fsprogs/util.c
@@ -253,3 +253,14 @@ void make_journal_blocks(ext2_filsys fs, int journal_size, int journal_flags, in
if(!quiet)
puts("done");
}
+
+void 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);
+}