diff options
Diffstat (limited to 'arch/x86_64/ia32/sys_ia32.c')
-rw-r--r-- | arch/x86_64/ia32/sys_ia32.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/x86_64/ia32/sys_ia32.c b/arch/x86_64/ia32/sys_ia32.c index 54481af5344a..2bc55af95419 100644 --- a/arch/x86_64/ia32/sys_ia32.c +++ b/arch/x86_64/ia32/sys_ia32.c | |||
@@ -180,6 +180,28 @@ sys32_fstat64(unsigned int fd, struct stat64 __user *statbuf) | |||
180 | return ret; | 180 | return ret; |
181 | } | 181 | } |
182 | 182 | ||
183 | asmlinkage long | ||
184 | sys32_fstatat(unsigned int dfd, char __user *filename, | ||
185 | struct stat64 __user* statbuf, int flag) | ||
186 | { | ||
187 | struct kstat stat; | ||
188 | int error = -EINVAL; | ||
189 | |||
190 | if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0) | ||
191 | goto out; | ||
192 | |||
193 | if (flag & AT_SYMLINK_NOFOLLOW) | ||
194 | error = vfs_lstat_fd(dfd, filename, &stat); | ||
195 | else | ||
196 | error = vfs_stat_fd(dfd, filename, &stat); | ||
197 | |||
198 | if (!error) | ||
199 | error = cp_stat64(statbuf, &stat); | ||
200 | |||
201 | out: | ||
202 | return error; | ||
203 | } | ||
204 | |||
183 | /* | 205 | /* |
184 | * Linux/i386 didn't use to be able to handle more than | 206 | * Linux/i386 didn't use to be able to handle more than |
185 | * 4 system call parameters, so these system calls used a memory | 207 | * 4 system call parameters, so these system calls used a memory |