From 610c850501ff9d21d06b4a9942f2cfd2c347619e Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Sun, 23 Jan 2005 11:27:02 +0000 Subject: When there is no umount syscall, but umount2 is available, then try to emulate umount() using umount2() --- libc/sysdeps/linux/common/umount.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libc/sysdeps/linux/common/umount.c') diff --git a/libc/sysdeps/linux/common/umount.c b/libc/sysdeps/linux/common/umount.c index 6457ddf30..f4eb8c64e 100644 --- a/libc/sysdeps/linux/common/umount.c +++ b/libc/sysdeps/linux/common/umount.c @@ -12,6 +12,13 @@ #ifdef __NR_umount /* Some newer archs only have umount2 */ #include _syscall1(int, umount, const char *, specialfile); +#elif defined __NR_umount2 +/* No umount syscall, but umount2 is available.... Try to + * emulate umount() using umount2() */ +int umount(const char *special_file, int flags) +{ + return _syscall2(int, umount2, const char *, special_file, int, flags); +} #else int umount(const char *special_file) { -- cgit v1.2.3