Magellan Linux

Contents of /tags/mkinitrd-6_3_0/klibc/usr/utils/pivot_root.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1139 - (show annotations) (download)
Thu Aug 19 10:14:02 2010 UTC (13 years, 10 months ago) by niro
File MIME type: text/plain
File size: 346 byte(s)
tagged 'mkinitrd-6_3_0'
1 /* Change the root file system */
2
3 /* Written 2000 by Werner Almesberger */
4
5 #include <stdio.h>
6 #include <sys/mount.h>
7
8 int main(int argc, const char **argv)
9 {
10 if (argc != 3) {
11 fprintf(stderr, "Usage: %s new_root put_old\n", argv[0]);
12 return 1;
13 }
14 if (pivot_root(argv[1], argv[2]) < 0) {
15 perror("pivot_root");
16 return 1;
17 }
18 return 0;
19 }