opening a charcter device without using filp_open()

From: David Chow (davidchow@shaolinmicro.com)
Date: Wed Jan 08 2003 - 02:29:46 EST


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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Jan 15 2003 - 22:00:22 EST