[ARM] 4878/1: Add oabi shim for fstatat64
Ccoreutils and other have started using fstatat64. Thus, we need a shim for it if we want to support modern oldabi userlands (such as Debian/arm/lenny) with EABI kernels. See http://bugs.debian.org/462677 Acked-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Riku Voipio <riku.voipio@movial.fi> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
committed by
Russell King
parent
3085354de6
commit
c60afe1014
@@ -336,7 +336,7 @@
|
|||||||
CALL(sys_mknodat)
|
CALL(sys_mknodat)
|
||||||
/* 325 */ CALL(sys_fchownat)
|
/* 325 */ CALL(sys_fchownat)
|
||||||
CALL(sys_futimesat)
|
CALL(sys_futimesat)
|
||||||
CALL(sys_fstatat64)
|
CALL(ABI(sys_fstatat64, sys_oabi_fstatat64))
|
||||||
CALL(sys_unlinkat)
|
CALL(sys_unlinkat)
|
||||||
CALL(sys_renameat)
|
CALL(sys_renameat)
|
||||||
/* 330 */ CALL(sys_linkat)
|
/* 330 */ CALL(sys_linkat)
|
||||||
|
@@ -25,6 +25,7 @@
|
|||||||
* sys_stat64:
|
* sys_stat64:
|
||||||
* sys_lstat64:
|
* sys_lstat64:
|
||||||
* sys_fstat64:
|
* sys_fstat64:
|
||||||
|
* sys_fstatat64:
|
||||||
*
|
*
|
||||||
* struct stat64 has different sizes and some members are shifted
|
* struct stat64 has different sizes and some members are shifted
|
||||||
* Compatibility wrappers are needed for them and provided below.
|
* Compatibility wrappers are needed for them and provided below.
|
||||||
@@ -169,6 +170,29 @@ asmlinkage long sys_oabi_fstat64(unsigned long fd,
|
|||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
asmlinkage long sys_oabi_fstatat64(int dfd,
|
||||||
|
char __user *filename,
|
||||||
|
struct oldabi_stat64 __user *statbuf,
|
||||||
|
int flag)
|
||||||
|
{
|
||||||
|
struct kstat stat;
|
||||||
|
int error = -EINVAL;
|
||||||
|
|
||||||
|
if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0)
|
||||||
|
goto out;
|
||||||
|
|
||||||
|
if (flag & AT_SYMLINK_NOFOLLOW)
|
||||||
|
error = vfs_lstat_fd(dfd, filename, &stat);
|
||||||
|
else
|
||||||
|
error = vfs_stat_fd(dfd, filename, &stat);
|
||||||
|
|
||||||
|
if (!error)
|
||||||
|
error = cp_oldabi_stat64(&stat, statbuf);
|
||||||
|
|
||||||
|
out:
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
struct oabi_flock64 {
|
struct oabi_flock64 {
|
||||||
short l_type;
|
short l_type;
|
||||||
short l_whence;
|
short l_whence;
|
||||||
|
Reference in New Issue
Block a user