diff options
Diffstat (limited to 'arch/arm/kernel/sys_oabi-compat.c')
-rw-r--r-- | arch/arm/kernel/sys_oabi-compat.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/arm/kernel/sys_oabi-compat.c b/arch/arm/kernel/sys_oabi-compat.c index e8b98046895b..96ab5f52949c 100644 --- a/arch/arm/kernel/sys_oabi-compat.c +++ b/arch/arm/kernel/sys_oabi-compat.c | |||
@@ -25,6 +25,7 @@ | |||
25 | * sys_stat64: | 25 | * sys_stat64: |
26 | * sys_lstat64: | 26 | * sys_lstat64: |
27 | * sys_fstat64: | 27 | * sys_fstat64: |
28 | * sys_fstatat64: | ||
28 | * | 29 | * |
29 | * struct stat64 has different sizes and some members are shifted | 30 | * struct stat64 has different sizes and some members are shifted |
30 | * Compatibility wrappers are needed for them and provided below. | 31 | * Compatibility wrappers are needed for them and provided below. |
@@ -169,6 +170,29 @@ asmlinkage long sys_oabi_fstat64(unsigned long fd, | |||
169 | return error; | 170 | return error; |
170 | } | 171 | } |
171 | 172 | ||
173 | asmlinkage long sys_oabi_fstatat64(int dfd, | ||
174 | char __user *filename, | ||
175 | struct oldabi_stat64 __user *statbuf, | ||
176 | int flag) | ||
177 | { | ||
178 | struct kstat stat; | ||
179 | int error = -EINVAL; | ||
180 | |||
181 | if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0) | ||
182 | goto out; | ||
183 | |||
184 | if (flag & AT_SYMLINK_NOFOLLOW) | ||
185 | error = vfs_lstat_fd(dfd, filename, &stat); | ||
186 | else | ||
187 | error = vfs_stat_fd(dfd, filename, &stat); | ||
188 | |||
189 | if (!error) | ||
190 | error = cp_oldabi_stat64(&stat, statbuf); | ||
191 | |||
192 | out: | ||
193 | return error; | ||
194 | } | ||
195 | |||
172 | struct oabi_flock64 { | 196 | struct oabi_flock64 { |
173 | short l_type; | 197 | short l_type; |
174 | short l_whence; | 198 | short l_whence; |