summaryrefslogtreecommitdiff
path: root/arch/sparc64/kernel/sys_sparc32.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-02-12 23:30:11 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2006-02-12 23:30:11 -0800
commit40ad7a6afc53217ad95b5ae2221e42d7655e057b (patch)
treea164f00f514bb816abe370b1050c88799a8572f4 /arch/sparc64/kernel/sys_sparc32.c
parente9bb4c9929a63b23dcc637fae312b36b038bdc61 (diff)
[SPARC]: sys_newfstatat --> sys_fstatat64
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/sys_sparc32.c')
-rw-r--r--arch/sparc64/kernel/sys_sparc32.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/sys_sparc32.c b/arch/sparc64/kernel/sys_sparc32.c
index 9264ccbaaafa..417727bd87ba 100644
--- a/arch/sparc64/kernel/sys_sparc32.c
+++ b/arch/sparc64/kernel/sys_sparc32.c
@@ -428,6 +428,27 @@ asmlinkage long compat_sys_fstat64(unsigned int fd,
return error;
}
+asmlinkage long compat_sys_fstatat64(unsigned int dfd, char __user *filename,
+ struct compat_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_compat_stat64(&stat, statbuf);
+
+out:
+ return error;
+}
+
asmlinkage long compat_sys_sysfs(int option, u32 arg1, u32 arg2)
{
return sys_sysfs(option, arg1, arg2);