[lkml]   [1998]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: 2.1.118 Tons of oopes 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
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:44    [W:0.023 / U:11.220 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site