Grrr.... Correct patch follows:
--- drivers/char/tty_io.c Sat May 17 11:14:02 2003
+++ /tmp/tty_io.c Sun May 25 07:49:08 2003
@@ -751,6 +751,10 @@
struct tty_struct * tty;
struct inode *inode = file->f_dentry->d_inode;
+ /* Can't seek (pwrite) on ttys. */
+ if (ppos != &file->f_pos)
+ return -ESPIPE;
+
/*
* For now, we redirect writes from /dev/console as
* well as /dev/tty0.
@@ -770,15 +774,11 @@
spin_unlock(&redirect_lock);
if (p) {
- ssize_t res = p->f_op->write(p, buf, count, ppos);
+ ssize_t res = p->f_op->write(p, buf, count, &p->f_pos);
fput(p);
return res;
}
}
-
- /* Can't seek (pwrite) on ttys. */
- if (ppos != &file->f_pos)
- return -ESPIPE;
tty = (struct tty_struct *)file->private_data;
if (tty_paranoia_check(tty, inode->i_rdev, "tty_write"))
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/