Windows: chrootarchive refactor

Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
John Howard 2015-05-14 15:08:00 -07:00
parent 24fd826fc0
commit d025345cdd
5 changed files with 77 additions and 34 deletions

View file

@ -0,0 +1,14 @@
// +build !windows
package chrootarchive
import (
"syscall"
)
func chroot(path string) error {
if err := syscall.Chroot(path); err != nil {
return err
}
return syscall.Chdir("/")
}