]>
Commit | Line | Data |
---|---|---|
22853e4a KZ |
1 | /* pivot_root.c - Change the root file system */ |
2 | ||
3 | /* Written 2000 by Werner Almesberger */ | |
4 | ||
5 | ||
6 | #include <stdio.h> | |
7 | #include <linux/unistd.h> | |
8 | ||
66ee8158 | 9 | static |
22853e4a KZ |
10 | _syscall2(int,pivot_root,const char *,new_root,const char *,put_old) |
11 | ||
12 | ||
13 | int main(int argc,const char **argv) | |
14 | { | |
15 | if (argc != 3) { | |
16 | fprintf(stderr,"usage: %s new_root put_old\n",argv[0]); | |
17 | return 1; | |
18 | } | |
19 | if (pivot_root(argv[1],argv[2]) < 0) { | |
20 | perror("pivot_root"); | |
21 | return 1; | |
22 | } | |
23 | return 0; | |
24 | } |