summaryrefslogtreecommitdiff
path: root/libbb/xfuncs_printf.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/xfuncs_printf.c')
-rw-r--r--libbb/xfuncs_printf.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libbb/xfuncs_printf.c b/libbb/xfuncs_printf.c
index 7348890..4aa1b5c 100644
--- a/libbb/xfuncs_printf.c
+++ b/libbb/xfuncs_printf.c
@@ -390,6 +390,12 @@ void FAST_FUNC xchdir(const char *path)
bb_perror_msg_and_die("can't change directory to '%s'", path);
}
+void FAST_FUNC xfchdir(int fd)
+{
+ if (fchdir(fd))
+ bb_perror_msg_and_die("fchdir");
+}
+
void FAST_FUNC xchroot(const char *path)
{
if (chroot(path))