mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-27 07:20:11 +00:00
5f45f96ad0
Linux kernel architectures have various arrangements for umount syscalls. There is a syscall that takes flags, and an older one that does not. Newer architectures have only the one taking flags, under the name umount2 (or under the name umount, in the ia64 case). Older architectures may have both, under the names umount2 and umount (or under the names umount and oldumount, in the alpha case). glibc then has several similar implementations of the umount function (no flags) in terms of either the __umount2 function, or the corresponding syscall, or in terms of the old syscall under either of its names. This patch simplifies the implementations in glibc by always using the __umount2 function to implement the umount function on all systems using the Linux kernel. The linux/generic implementation is moved to sysdeps/unix/sysv/linux (without any changes to code or comments) and all the other variants are removed. (This will have the effect of causing the new syscall to be used in some cases that previously used the old one, but as discussed for previous changes, such a change to the underlying syscalls used is OK.) There remain two variants of how the __umount2 function is implemented, either in umount2.S, or, for ia64, in syscalls.list. Tested with build-many-glibcs.py. [BZ #16552] * sysdeps/unix/sysv/linux/generic/umount.c: Move to .... * sysdeps/unix/sysv/linux/umount.c: ... here. * sysdeps/unix/sysv/linux/arm/umount.c: Remove file. * sysdeps/unix/sysv/linux/hppa/umount.c: Likewise. * sysdeps/unix/sysv/linux/ia64/umount.c: Likewise. * sysdeps/unix/sysv/linux/mips/mips64/umount.c: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/umount.c: Likewise. * sysdeps/unix/sysv/linux/umount.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/umount.c: Likewise. |
||
---|---|---|
.. | ||
bits | ||
wordsize-32 | ||
____longjmp_chk.c | ||
brk.c | ||
chmod.c | ||
chown.c | ||
dl-origin.c | ||
dup2.c | ||
epoll_create.c | ||
futimesat.c | ||
getdents64.c | ||
getdents.c | ||
inotify_init.c | ||
kernel_stat.h | ||
lchown.c | ||
link.c | ||
lxstat.c | ||
Makefile | ||
mkdir.c | ||
pipe.c | ||
readlink_chk.c | ||
readlink.c | ||
README | ||
rmdir.c | ||
symlink.c | ||
syscalls.list | ||
sysctl.c | ||
sysdep.h | ||
unlink.c | ||
ustat.c | ||
utimes.c | ||
xmknod.c | ||
xstat.c |
This hierarchy supports Linux systems using the new asm-generic/unistd.h, which removes many familiar old syscalls. For example, to implement open(), newer Linux architectures require glibc to invoke the __NR_openat syscall with AT_FDCWD. This hierarchy provides all those implementations. It also provides support for 32-bit platforms using the 64-bit kernel syscall APIs, as the 32-bit ones are no longer provided. Note that newer ILP32 environments (x32 or AArch64:ILP32, for example) are converting to use more 64-bit types in kernel syscalls, so that aspect of this support is in more flux as of this writing.