All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Chow <davidchow@shaolinmicro.com>
To: linux-kernel@vger.kernel.org
Subject: opening a charcter device without using filp_open()
Date: Wed, 08 Jan 2003 15:29:46 +0800	[thread overview]
Message-ID: <3E1BD36A.20503@shaolinmicro.com> (raw)

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


                 reply	other threads:[~2003-01-08  7:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3E1BD36A.20503@shaolinmicro.com \
    --to=davidchow@shaolinmicro.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.