diff options
Diffstat (limited to 'libbb/xfuncs.c')
-rw-r--r-- | libbb/xfuncs.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c index 17760a3c3..18e696a7a 100644 --- a/libbb/xfuncs.c +++ b/libbb/xfuncs.c | |||
@@ -577,6 +577,12 @@ void xchdir(const char *path) | |||
577 | bb_perror_msg_and_die("chdir(%s)", path); | 577 | bb_perror_msg_and_die("chdir(%s)", path); |
578 | } | 578 | } |
579 | 579 | ||
580 | void xchroot(const char *path) | ||
581 | { | ||
582 | if (chroot(path)) | ||
583 | bb_perror_msg_and_die("can't change root directory to %s", path); | ||
584 | } | ||
585 | |||
580 | // Print a warning message if opendir() fails, but don't die. | 586 | // Print a warning message if opendir() fails, but don't die. |
581 | DIR *warn_opendir(const char *path) | 587 | DIR *warn_opendir(const char *path) |
582 | { | 588 | { |