Changeset 1770 in MondoRescue for branches/stable/mindi-busybox/util-linux/pivot_root.c
- Timestamp:
- Nov 6, 2007, 11:01:53 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mindi-busybox/util-linux/pivot_root.c
r821 r1770 7 7 * regardless of the kernel being used. 8 8 * 9 * Licensed under GPL v2 or later, see file LICENSE in this tarball for details.9 * Licensed under GPL version 2, see file LICENSE in this tarball for details. 10 10 */ 11 #include <stdlib.h> 12 #include <stdio.h> 13 #include <errno.h> 14 #include "busybox.h" 11 #include "libbb.h" 15 12 16 13 extern int pivot_root(const char * new_root,const char * put_old); 17 14 15 int pivot_root_main(int argc, char **argv); 18 16 int pivot_root_main(int argc, char **argv) 19 17 { 20 21 bb_show_usage();18 if (argc != 3) 19 bb_show_usage(); 22 20 23 if (pivot_root(argv[1],argv[2]) < 0) 24 bb_perror_msg_and_die("pivot_root"); 21 if (pivot_root(argv[1], argv[2]) < 0) { 22 /* prints "pivot_root: <strerror text>" */ 23 bb_perror_nomsg_and_die(); 24 } 25 25 26 return EXIT_SUCCESS; 27 26 return EXIT_SUCCESS; 28 27 }
Note:
See TracChangeset
for help on using the changeset viewer.