]> git.pld-linux.org Git - packages/busybox.git/blame - busybox-pivot_root.patch
- 0.60.5
[packages/busybox.git] / busybox-pivot_root.patch
CommitLineData
82279822 1diff -uNr busybox-0.60.1.orig/libbb/syscalls.c busybox-0.60.1/libbb/syscalls.c
2--- busybox-0.60.1.orig/libbb/syscalls.c Fri Jun 29 18:59:32 2001
3+++ busybox-0.60.1/libbb/syscalls.c Thu Apr 25 08:11:30 2002
4@@ -45,29 +45,27 @@
774a7fad
MM
5 #endif
6
7 #ifndef __NR_pivot_root
8-#warning This kernel does not support the pivot_root syscall
9-#warning -> The pivot_root system call is being stubbed out...
10-int pivot_root(const char * new_root,const char * put_old)
11-{
12- /* BusyBox was compiled against a kernel that did not support
13- * the pivot_root system call. To make this application work,
14- * you will need to recompile with a kernel supporting the
15- * pivot_root system call.
16- */
17- fprintf(stderr, "\n\nTo make this application work, you will need to recompile\n");
18- fprintf(stderr, "with a kernel supporting the pivot_root system call. -Erik\n\n");
19- errno=ENOSYS;
20- return -1;
21-}
22-#else
23-# if defined(__ia64__)
24+# warning "Guessing pivot_root() syscall number"
25+# ifdef __i386__
26+# define __NR_pivot_root 217
27+# elif defined(__alpha__)
28+# define __NR_pivot_root 374
29+# elif defined(__sparc__) || defined(__sparc64__)
30+# define __NR_pivot_root 146
82279822 31+# elif defined(__powerpc__)
32+# define __NR_pivot_root 203
774a7fad
MM
33+# else
34+# error "Get kernel-2.4 headers!"
35+# endif
36+#endif
37+
38+#if defined(__ia64__)
39 int pivot_root(const char * new_root,const char * put_old)
40 {
41 return(syscall(__NR_pivot_root, new_root, put_old));
42 }
43-# else
44+#else
45 _syscall2(int,pivot_root,const char *,new_root,const char *,put_old);
46-# endif
47 #endif
48
49
This page took 0.0275 seconds and 4 git commands to generate.