Mercurial > hg > toybox
comparison toys/other/pivot_root.c @ 1569:da72fa267b7b draft
A patch against your current ToT that builds in AOSP master.
author | Elliott Hughes <enh@google.com> |
---|---|
date | Fri, 21 Nov 2014 21:49:05 -0600 |
parents | 9e00446064fa |
children | 57f2a26fa92c |
comparison
equal
deleted
inserted
replaced
1568:272bd62cb194 | 1569:da72fa267b7b |
---|---|
20 */ | 20 */ |
21 | 21 |
22 #define FOR_pivot_root | 22 #define FOR_pivot_root |
23 #include "toys.h" | 23 #include "toys.h" |
24 | 24 |
25 #include <linux/unistd.h> | 25 #include <sys/syscall.h> |
26 #include <unistd.h> | |
26 | 27 |
27 void pivot_root_main(void) | 28 void pivot_root_main(void) |
28 { | 29 { |
29 if (syscall(__NR_pivot_root, toys.optargs[0], toys.optargs[1])) | 30 if (syscall(__NR_pivot_root, toys.optargs[0], toys.optargs[1])) |
30 perror_exit("'%s' -> '%s'", toys.optargs[0], toys.optargs[1]); | 31 perror_exit("'%s' -> '%s'", toys.optargs[0], toys.optargs[1]); |