patch-2.1.60 linux/drivers/char/vc_screen.c
Next file: linux/drivers/net/3c501.c
Previous file: linux/drivers/char/tty_io.c
Back to the patch index
Back to the overall index
- Lines: 50
- Date:
Tue Oct 21 08:57:28 1997
- Orig file:
v2.1.59/linux/drivers/char/vc_screen.c
- Orig date:
Tue Sep 23 16:48:47 1997
diff -u --recursive --new-file v2.1.59/linux/drivers/char/vc_screen.c linux/drivers/char/vc_screen.c
@@ -103,12 +103,13 @@
}
#define RETURN( x ) { enable_bh( CONSOLE_BH ); return x; }
-static long
-vcs_read(struct inode *inode, struct file *file, char *buf, unsigned long count)
+static ssize_t
+vcs_read(struct file *file, char *buf, size_t count, loff_t *ppos)
{
- int p = file->f_pos;
+ struct inode *inode = file->f_dentry->d_inode;
unsigned int currcons = MINOR(inode->i_rdev);
- int viewed, attr, size, read;
+ long p = *ppos;
+ long viewed, attr, size, read;
char *buf0;
unsigned short *org = NULL;
@@ -160,16 +161,17 @@
put_user(func_scr_readw(org) & 0xff, buf++);
}
read = buf - buf0;
- file->f_pos += read;
+ *ppos += read;
RETURN( read );
}
-static long
-vcs_write(struct inode *inode, struct file *file, const char *buf, unsigned long count)
+static ssize_t
+vcs_write(struct file *file, const char *buf, size_t count, loff_t *ppos)
{
- int p = file->f_pos;
+ struct inode *inode = file->f_dentry->d_inode;
unsigned int currcons = MINOR(inode->i_rdev);
- int viewed, attr, size, written;
+ long p = *ppos;
+ long viewed, attr, size, written;
const char *buf0;
unsigned short *org = NULL;
@@ -242,7 +244,7 @@
update_screen(currcons);
#endif
written = buf - buf0;
- file->f_pos += written;
+ *ppos += written;
RETURN( written );
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov