kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* what happens to "open" if the slot is left empty in file_operations.
@ 2015-11-14  7:10 Shiyao Ma
  2015-11-14  8:16 ` Sudip Mukherjee
  0 siblings, 1 reply; 2+ messages in thread
From: Shiyao Ma @ 2015-11-14  7:10 UTC (permalink / raw)
  To: kernelnewbies

Hi,


When writing a char device driver, if the "open" slots is left vacant in
the file_operations structure, what will happen if "open" is called ?


An answer that gives the relevant code will be more than appreciated.



Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20151114/3749e19d/attachment.html 

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

* what happens to "open" if the slot is left empty in file_operations.
  2015-11-14  7:10 what happens to "open" if the slot is left empty in file_operations Shiyao Ma
@ 2015-11-14  8:16 ` Sudip Mukherjee
  0 siblings, 0 replies; 2+ messages in thread
From: Sudip Mukherjee @ 2015-11-14  8:16 UTC (permalink / raw)
  To: kernelnewbies

On Sat, Nov 14, 2015 at 12:40 PM, Shiyao Ma <i@introo.me> wrote:

> Hi,
>
>
> When writing a char device driver, if the "open" slots is left vacant in
> the file_operations structure, what will happen if "open" is called ?
>

You can have a loot at chrdev_open() function in  fs/char_dev.c  file.

regards
sudip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20151114/c34ea387/attachment.html 

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

end of thread, other threads:[~2015-11-14  8:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-14  7:10 what happens to "open" if the slot is left empty in file_operations Shiyao Ma
2015-11-14  8:16 ` Sudip Mukherjee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).