patch-2.0.21-2.1.0 linux/drivers/char/vc_screen.c

Next file: linux/drivers/net/bsd_comp.c
Previous file: linux/drivers/char/tty_io.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file lx2.0/v2.0.21/linux/drivers/char/vc_screen.c linux/drivers/char/vc_screen.c
@@ -36,8 +36,8 @@
 	return size;
 }
 
-static int
-vcs_lseek(struct inode *inode, struct file *file, off_t offset, int orig)
+static long long
+vcs_lseek(struct inode *inode, struct file *file, long long offset, int orig)
 {
 	int size = vcs_size(inode);
 
@@ -59,8 +59,8 @@
 	return file->f_pos;
 }
 
-static int
-vcs_read(struct inode *inode, struct file *file, char *buf, int count)
+static long
+vcs_read(struct inode *inode, struct file *file, char *buf, unsigned long count)
 {
 	unsigned long p = file->f_pos;
 	unsigned int cons = MINOR(inode->i_rdev);
@@ -81,7 +81,7 @@
 		return -ENXIO;
 
 	size = vcs_size(inode);
-	if (count < 0 || p > size)
+	if (p > size)
 		return -EINVAL;
 	if (count > size - p)
 		count = size - p;
@@ -117,8 +117,8 @@
 	return read;
 }
 
-static int
-vcs_write(struct inode *inode, struct file *file, const char *buf, int count)
+static long
+vcs_write(struct inode *inode, struct file *file, const char *buf, unsigned long count)
 {
 	unsigned long p = file->f_pos;
 	unsigned int cons = MINOR(inode->i_rdev);
@@ -139,7 +139,7 @@
 		return -ENXIO;
 
 	size = vcs_size(inode);
-	if (count < 0 || p > size)
+	if (p > size)
 		return -EINVAL;
 	if (count > size - p)
 		count = size - p;

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