public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* opening a charcter device without using filp_open()
@ 2003-01-08  7:29 David Chow
  0 siblings, 0 replies; only message in thread
From: David Chow @ 2003-01-08  7:29 UTC (permalink / raw)
  To: linux-kernel

Hi all,

Is it possible to open a character device in kernel space without 
actually openning the device file? Because I don't wan to hold the usage 
count of a particular mount or dcache.

This is what I planned to do,

    struct file fake_devfile = {0};
    struct dentry fake_dentry = {0};
    struct inode fake_inode = {0};

    /* Link up fake file,dentry, inode */
    fake_file.f_dentry=&fake_dentry;
    fake_dentry.d_inode=&fake_inode;

Then I will call the f_op of the character device directly, please give 
advice. Thanks.

regards,
David Chow


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-01-08  7:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-08  7:29 opening a charcter device without using filp_open() David Chow

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox