OSDN Git Service

alpha: add special umount2 handling
authorWaldemar Brodkorb <wbx@openadk.org>
Thu, 22 Oct 2015 01:48:09 +0000 (03:48 +0200)
committerWaldemar Brodkorb <wbx@uclibc-ng.org>
Thu, 22 Oct 2015 01:55:22 +0000 (03:55 +0200)
Only on Linux alpha __NR_oldumount is defined and a umount not
umount2 syscall, but with two parameter is used.
Add special handling for it and an alias for umount2() users.

There was a discussion about this special handling, but it seems
it was never committed upstream:
http://marc.info/?l=linux-alpha&m=137455037930738&w=2

Runtime tested with qemu-alpha and a statically linked busybox
binary.

libc/sysdeps/linux/common/umount2.c

index 08e0f33..c86f3c8 100644 (file)
 #include <sys/syscall.h>
 
 #if defined __UCLIBC_LINUX_SPECIFIC__ && defined __NR_umount2
-# include <sys/mount.h>
+#include <sys/mount.h>
 _syscall2(int, umount2, const char *, special_file, int, flags)
 libc_hidden_def(umount2)
 #endif
+
+#if defined __UCLIBC_LINUX_SPECIFIC__ && defined __NR_oldumount
+_syscall2(int, umount, const char *, special_file, int, flags)
+strong_alias(umount,umount2)
+#endif