aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-08-20 19:16:48 +0000
committerUlrich Drepper <drepper@redhat.com>1998-08-20 19:16:48 +0000
commit7934cc16733720b3eb61ca83e22c62a8ffd9c644 (patch)
tree00c4a04ee24035ceda6daf51a522e707feb5f6df /sysdeps
parentdf777c40c1d8bc15dcc71a7da183f2a2c99bda62 (diff)
downloadglibc-7934cc16733720b3eb61ca83e22c62a8ffd9c644.tar
glibc-7934cc16733720b3eb61ca83e22c62a8ffd9c644.tar.gz
glibc-7934cc16733720b3eb61ca83e22c62a8ffd9c644.tar.bz2
glibc-7934cc16733720b3eb61ca83e22c62a8ffd9c644.zip
Update.
1998-08-20 19:14 Ulrich Drepper <drepper@cygnus.com> * sysdeps/unix/sysv/linux/Makefile [subdirs=misc] (sysdeps_routines): Add umount and umount2. * sysdeps/unix/sysv/linux/syscalls.list: Remove umount. * sysdeps/unix/sysv/linux/umount.S: New file. * sysdeps/unix/sysv/linux/umount2.S: New file. * sysdeps/unix/sysv/linux/sys/mount.h: Declare umount2. Define MNT_FORCE.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/unix/sysv/linux/Makefile3
-rw-r--r--sysdeps/unix/sysv/linux/sys/mount.h7
-rw-r--r--sysdeps/unix/sysv/linux/syscalls.list1
-rw-r--r--sysdeps/unix/sysv/linux/umount.S12
-rw-r--r--sysdeps/unix/sysv/linux/umount2.S13
5 files changed, 34 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index b84fbed0c7..5c38ced83f 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -9,7 +9,8 @@ CPPFLAGS += -DHAVE_LLSEEK=1
endif
ifeq ($(subdir),misc)
-sysdep_routines += sysctl clone llseek getresuid getresgid sys_setresuid
+sysdep_routines += sysctl clone llseek getresuid getresgid sys_setresuid \
+ umount umount2
sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h sys/mtio.h \
sys/io.h sys/klog.h sys/kdaemon.h \
diff --git a/sysdeps/unix/sysv/linux/sys/mount.h b/sysdeps/unix/sysv/linux/sys/mount.h
index 589ecbc1c5..4b7154928c 100644
--- a/sysdeps/unix/sysv/linux/sys/mount.h
+++ b/sysdeps/unix/sysv/linux/sys/mount.h
@@ -82,6 +82,10 @@ enum
#define BLKRAGET _IO(0x12, 99) /* Get current read ahead setting. */
+/* Possible value for FLAGS parameter of `umount2'. */
+#define MNT_FORCE /* Force unmounting. */
+
+
__BEGIN_DECLS
/* Mount a filesystem. */
@@ -92,6 +96,9 @@ extern int mount __P ((__const char *__special_file, __const char *__dir,
/* Unmount a filesystem. */
extern int umount __P ((__const char *__special_file));
+/* Unmount a filesystem. Forst unmounting if FALGS is set to MNT_FORCE. */
+extern int umount2 __P ((__const char *__special_file, int __flags));
+
__END_DECLS
#endif /* _SYS_MOUNT_H */
diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list
index 6d06d0df99..82c6423afc 100644
--- a/sysdeps/unix/sysv/linux/syscalls.list
+++ b/sysdeps/unix/sysv/linux/syscalls.list
@@ -82,6 +82,5 @@ sys_writev writev writev 3 __syscall_writev
sysinfo EXTRA sysinfo 1 sysinfo
swapon - swapon 2 __swapon swapon
swapoff - swapoff 1 __swapoff swapoff
-umount EXTRA umount 1 __umount umount
uselib EXTRA uselib 1 uselib
wait4 - wait4 4 __wait4 wait4
diff --git a/sysdeps/unix/sysv/linux/umount.S b/sysdeps/unix/sysv/linux/umount.S
new file mode 100644
index 0000000000..e18463e2e6
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/umount.S
@@ -0,0 +1,12 @@
+/* This hack is necessary since the kernel people are making "strange"
+ changes. They simply rename old system calls. */
+
+#include <sysdep.h>
+#ifdef __NR_oldumount
+PSEUDO (__umount, oldumount, 1)
+#else
+PSEUDO (__umount, umount, 1)
+#endif
+ ret
+PSEUDO_END(__umount)
+weak_alias (__umount, umount)
diff --git a/sysdeps/unix/sysv/linux/umount2.S b/sysdeps/unix/sysv/linux/umount2.S
new file mode 100644
index 0000000000..92241bbf97
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/umount2.S
@@ -0,0 +1,13 @@
+/* umount system call with two parameters. */
+
+#include <sysdep.h>
+#if defined __NR_oldumount || defined __NR_umount2
+#ifdef __NR_oldumount
+PSEUDO (__umount2, umount, 2)
+#else
+PSEUDO (__umount2, umount2, 2)
+#endif
+ ret
+PSEUDO_END(__umount2)
+weak_alias (__umount2, umount2)
+#endif