فهرست منبع

When there is no umount syscall, but umount2 is available, then
try to emulate umount() using umount2()

Eric Andersen 21 سال پیش
والد
کامیت
610c850501
1فایلهای تغییر یافته به همراه7 افزوده شده و 0 حذف شده
  1. 7 0
      libc/sysdeps/linux/common/umount.c

+ 7 - 0
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)
 {