All of lore.kernel.org
 help / color / mirror / Atom feed
* [KJ] replacing old-style "non-seekable" errors with "no_llseek"
@ 2007-05-27 21:28 Robert P. J. Day
  2007-05-27 22:00 ` Arnd Bergmann
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Robert P. J. Day @ 2007-05-27 21:28 UTC (permalink / raw)
  To: kernel-janitors


  based on a discussion of lseek() here:

http://lwn.net/Articles/96662/

it appears that an old-style way of specifying that a device was
non-seekable:

    loff_t my_llseek(struct file *file, loff_t offset, int whence)
    {
        return -ESPIPE;    /* Not seekable */
    }

can be rewritten more cleanly using the no_llseek() helper routine,
and just assigning no_llseek to the llseek member of the
file_operations struct, as in:

    .llseek = no_llseek

and deleting the old routine.  am i reading that correctly?  or is
there more to it than that?

rday
-- 
====================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://fsdev.net/wiki/index.php?title=Main_Page
====================================
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-05-28 19:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-27 21:28 [KJ] replacing old-style "non-seekable" errors with "no_llseek" Robert P. J. Day
2007-05-27 22:00 ` Arnd Bergmann
2007-05-28 17:46 ` Robert P. J. Day
2007-05-28 19:13 ` Robert P. J. Day

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.