patch-2.0.21-2.1.0 linux/fs/proc/mem.c

Next file: linux/fs/proc/net.c
Previous file: linux/fs/proc/kmsg.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file lx2.0/v2.0.21/linux/fs/proc/mem.c linux/fs/proc/mem.c
@@ -76,7 +76,8 @@
 	return tsk;
 }
 
-static int mem_read(struct inode * inode, struct file * file,char * buf, int count)
+static long mem_read(struct inode * inode, struct file * file,
+	char * buf, unsigned long count)
 {
 	pgd_t *page_dir;
 	pmd_t *page_middle;
@@ -87,8 +88,6 @@
 	char *tmp;
 	int i;
 
-	if (count < 0)
-		return -EINVAL;
 	tsk = get_task(inode->i_ino >> 16);
 	if (!tsk)
 		return -ESRCH;
@@ -134,7 +133,8 @@
 
 #ifndef mem_write
 
-static int mem_write(struct inode * inode, struct file * file,char * buf, int count)
+static long mem_write(struct inode * inode, struct file * file,
+	char * buf, unsigned long count)
 {
 	pgd_t *page_dir;
 	pmd_t *page_middle;
@@ -145,8 +145,6 @@
 	char *tmp;
 	int i;
 
-	if (count < 0)
-		return -EINVAL;
 	addr = file->f_pos;
 	tsk = get_task(inode->i_ino >> 16);
 	if (!tsk)
@@ -195,7 +193,8 @@
 
 #endif
 
-static int mem_lseek(struct inode * inode, struct file * file, off_t offset, int orig)
+static long long mem_lseek(struct inode * inode, struct file * file,
+	long long offset, int orig)
 {
 	switch (orig) {
 		case 0:

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov