diff options
author | Eric Andersen <andersen@codepoet.org> | 2005-01-23 11:27:02 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2005-01-23 11:27:02 +0000 |
commit | 610c850501ff9d21d06b4a9942f2cfd2c347619e (patch) | |
tree | 1dc405281419ef5387c102e2946a853baf26af68 /libc/sysdeps/linux | |
parent | 13284bb0b24bd0a3ac7f3ac1033baedcfd0a7927 (diff) |
When there is no umount syscall, but umount2 is available, then
try to emulate umount() using umount2()
Diffstat (limited to 'libc/sysdeps/linux')
-rw-r--r-- | libc/sysdeps/linux/common/umount.c | 7 |
1 files changed, 7 insertions, 0 deletions
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 <sys/mount.h> _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) { |