Stub out pivot_root so it won't fail to compile.
authorEric Andersen <andersen@codepoet.org>
Fri, 23 Feb 2001 02:31:03 +0000 (02:31 -0000)
committerEric Andersen <andersen@codepoet.org>
Fri, 23 Feb 2001 02:31:03 +0000 (02:31 -0000)
 -Erik

pivot_root.c
util-linux/pivot_root.c

index d7b80d7493a7d50f0c522b4de68790b2eca44ab3..d34dcd7cc727c862d39a16a65eb3026f7e475d03 100644 (file)
 #include "busybox.h"
 
 #ifndef __NR_pivot_root
-#error Sorry, but this kernel does not support the pivot_root syscall
-#endif
+#warning This kernel does not support the pivot_root syscall
+#warning The pivot_root application is being stubbed out...
+int pivot_root_main(int argc, char **argv)
+{
+       printf("Please recompile with a kernel supporting the pivot_root syscall.\n");
+       return 0;
+}
+#else
 
 static _syscall2(int,pivot_root,const char *,new_root,const char *,put_old)
 
@@ -28,6 +34,7 @@ int pivot_root_main(int argc, char **argv)
     return EXIT_SUCCESS;
 
 }
+#endif
 
 
 /*
index d7b80d7493a7d50f0c522b4de68790b2eca44ab3..d34dcd7cc727c862d39a16a65eb3026f7e475d03 100644 (file)
 #include "busybox.h"
 
 #ifndef __NR_pivot_root
-#error Sorry, but this kernel does not support the pivot_root syscall
-#endif
+#warning This kernel does not support the pivot_root syscall
+#warning The pivot_root application is being stubbed out...
+int pivot_root_main(int argc, char **argv)
+{
+       printf("Please recompile with a kernel supporting the pivot_root syscall.\n");
+       return 0;
+}
+#else
 
 static _syscall2(int,pivot_root,const char *,new_root,const char *,put_old)
 
@@ -28,6 +34,7 @@ int pivot_root_main(int argc, char **argv)
     return EXIT_SUCCESS;
 
 }
+#endif
 
 
 /*