aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/sys_ppc32.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/sys_ppc32.c b/arch/powerpc/kernel/sys_ppc32.c
index bb1cfcfdbbbb..1cc5e9e5da96 100644
--- a/arch/powerpc/kernel/sys_ppc32.c
+++ b/arch/powerpc/kernel/sys_ppc32.c
@@ -343,6 +343,18 @@ off_t ppc32_lseek(unsigned int fd, u32 offset, unsigned int origin)
343 return sys_lseek(fd, (int)offset, origin); 343 return sys_lseek(fd, (int)offset, origin);
344} 344}
345 345
346long compat_sys_truncate(const char __user * path, u32 length)
347{
348 /* sign extend length */
349 return sys_truncate(path, (int)length);
350}
351
352long compat_sys_ftruncate(int fd, u32 length)
353{
354 /* sign extend length */
355 return sys_ftruncate(fd, (int)length);
356}
357
346/* Note: it is necessary to treat bufsiz as an unsigned int, 358/* Note: it is necessary to treat bufsiz as an unsigned int,
347 * with the corresponding cast to a signed int to insure that the 359 * with the corresponding cast to a signed int to insure that the
348 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode) 360 * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)