1 /* 2 * Copyright 2008, Ingo Weinhold, ingo_weinhold@gmx.de. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 6 #include <syscalls.h> 7 8 #include <errno.h> 9 #include <unistd.h> 10 11 #include <errno_private.h> 12 13 14 int 15 chroot(const char *path) 16 { 17 status_t error = _kern_change_root(path); 18 if (error != B_OK) { 19 __set_errno(error); 20 return -1; 21 } 22 23 return 0; 24 } 25