[parisc-linux-cvs] linux-2.6 tausq

Randolph Chung Randolph Chung <randolph@tausq.org>
Sat, 1 Nov 2003 12:07:30 -0800


> 	.              : Makefile 
> 	arch/parisc/kernel: sys_parisc.c 
> 
> Log message:
> fix sign-extension problems with pread, pwrite, readahead, truncate and ftruncate

this is hand-edited a bit since i have some other changes in my tree, 
but it's basically what i applied.

randolph

Index: sys_parisc.c
===================================================================
RCS file: /var/cvs/linux-2.6/arch/parisc/kernel/sys_parisc.c,v
retrieving revision 1.13
diff -u -p -r1.13 sys_parisc.c
--- sys_parisc.c	21 Sep 2003 14:33:58 -0000	1.13
+++ sys_parisc.c	1 Nov 2003 19:56:18 -0000
@@ -172,14 +173,12 @@ extern asmlinkage long sys_truncate(cons
 extern asmlinkage long sys_ftruncate(unsigned int, unsigned long);
 extern asmlinkage long sys_fcntl(unsigned int, unsigned int, unsigned long);
 
-asmlinkage long parisc_truncate64(const char * path,
-					unsigned int high, unsigned int low)
+asmlinkage long parisc_truncate64(const char * path, int high, int low)
 {
 	return sys_truncate(path, (long)high << 32 | low);
 }
 
-asmlinkage long parisc_ftruncate64(unsigned int fd,
-					unsigned int high, unsigned int low)
+asmlinkage long parisc_ftruncate64(unsigned int fd, int high, int low)
 {
 	return sys_ftruncate(fd, (long)high << 32 | low);
 }
@@ -203,14 +202,12 @@ asmlinkage long sys_fcntl64(unsigned int
 extern asmlinkage long sys_truncate64(const char *, loff_t);
 extern asmlinkage long sys_ftruncate64(unsigned int, loff_t);
 
-asmlinkage long parisc_truncate64(const char * path,
-					unsigned int high, unsigned int low)
+asmlinkage long parisc_truncate64(const char * path, int high, int low)
 {
 	return sys_truncate64(path, (loff_t)high << 32 | low);
 }
 
-asmlinkage long parisc_ftruncate64(unsigned int fd,
-					unsigned int high, unsigned int low)
+asmlinkage long parisc_ftruncate64(unsigned int fd, int high, int low)
 {
 	return sys_ftruncate64(fd, (loff_t)high << 32 | low);
 }
@@ -223,123 +220,36 @@ extern asmlinkage ssize_t sys_pwrite64(u
 extern asmlinkage ssize_t sys_readahead(int fd, loff_t offset, size_t count);
 
 asmlinkage ssize_t parisc_pread64(unsigned int fd, char *buf, size_t count,
-					unsigned int high, unsigned int low)
+					int high, int low)
 {
 	return sys_pread64(fd, buf, count, (loff_t)high << 32 | low);
 }
 
 asmlinkage ssize_t parisc_pwrite64(unsigned int fd, const char *buf,
-			size_t count, unsigned int high, unsigned int low)
+			size_t count, int high, int low)
 {
 	return sys_pwrite64(fd, buf, count, (loff_t)high << 32 | low);
 }
 
-asmlinkage ssize_t parisc_readahead(int fd, unsigned int high, unsigned int low,
+asmlinkage ssize_t parisc_readahead(int fd, int high, int low,
 		                    size_t count)
 {
 	return sys_readahead(fd, (loff_t)high << 32 | low, count);
 }