Magellan Linux

Contents of /trunk/mkinitrd-magellan/klibc/usr/utils/pivot_root.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 532 - (show annotations) (download)
Sat Sep 1 22:45:15 2007 UTC (16 years, 8 months ago) by niro
File MIME type: text/plain
File size: 346 byte(s)
-import if magellan mkinitrd; it is a fork of redhats mkinitrd-5.0.8 with all magellan patches and features; deprecates magellan-src/mkinitrd

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 }