Re: 2.1.118 Tons of oopes

Jamie Lokier (lkd@tantalophile.demon.co.uk)
Tue, 1 Sep 1998 15:57:02 +0100


wingel@t1.ctrl-c.liu.se writes:
> One way of "fixing" this for most cases might be to let register_chrdev
> call a function fixup_fops() like this:
>
> void fixup_fops(struct file_operations *fops)
> {
> if (!fops->llseek) fops->llseek = dummy_llseek;
> if (!fops->read) fops->llseek = dummy_read;
> if (!fops->write) fops->llseek = dummy_write;
> ...
> }

Richard Gooch wrote:
> That idea has some appeal. We can't rely on it, though, because there
> are plenty of drivers which substitute the methods structure at some
> point, and then sometimes later restore the methods.

Perhaps defining a typedef `file_operations' which puts the structure in
a special ELF section (does this work), they can then be filled in at
init time.

Confusing for first time readers I daresay.

-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html