Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-03-04 09:07:34 +0300
committerEric Andersen <andersen@codepoet.org>2001-03-04 09:07:34 +0300
commit076cdc24fcf65d9e8868418f17a6da10862bef2d (patch)
tree6c5d51c3c2b9ac7761afb6074ff8ce5a568b7e1c /utility.c
parent9ead68975c05100e4d1fda0b750fbc3688e68cfd (diff)
If umount2 is not available, stub it out.
Diffstat (limited to 'utility.c')
-rw-r--r--utility.c25
1 files changed, 20 insertions, 5 deletions
diff --git a/utility.c b/utility.c
index 76299beb7..62af4a59f 100644
--- a/utility.c
+++ b/utility.c
@@ -189,18 +189,33 @@ _syscall1(int, sysinfo, struct sysinfo *, info);
#if defined BB_MOUNT || defined BB_UMOUNT
-#ifndef __NR_umount2
-static const int __NR_umount2 = 52;
-#endif
-
/* Include our own version of <sys/mount.h>, since libc5 doesn't
* know about umount2 */
extern _syscall1(int, umount, const char *, special_file);
-extern _syscall2(int, umount2, const char *, special_file, int, flags);
extern _syscall5(int, mount, const char *, special_file, const char *, dir,
const char *, fstype, unsigned long int, rwflag, const void *, data);
+#ifndef __NR_umount2
+# warning This kernel does not support the umount2 syscall
+# warning The umount2 system call is being stubbed out...
+ int umount2(const char * special_file, int flags)
+ {
+ /* BusyBox was compiled against a kernel that did not support
+ * the umount2 system call. To make this application work,
+ * you will need to recompile with a kernel supporting the
+ * umount2 system call.
+ */
+ fprintf(stderr, "\n\nTo make this application work, you will need to recompile\n");
+ fprintf(stderr, "with a kernel supporting the umount2 system call. -Erik\n\n");
+ errno=ENOSYS;
+ return -1;
+ }
+# else
+ extern _syscall2(int, umount2, const char *, special_file, int, flags);
+# endif
#endif
+
+
#if defined BB_FEATURE_NEW_MODULE_INTERFACE && ( defined BB_INSMOD || defined BB_LSMOD )
#ifndef __NR_query_module
static const int __NR_query_module = 167;