struct inode initialization

Greg KH greg at kroah.com
Sun Jun 25 01:22:05 EDT 2017


On Sun, Jun 25, 2017 at 12:41:47AM +0530, vish chopra wrote:
> Hi,
> 
> i'm working on character driver.Unable to find when inode structure is
> create and when inode->i_cdev is assigned.
> Unable to find relation between inode and cdev.

What exact relation are you looking for?  A character driver shouldn't
ever care about this, it should be very simple code.  Have you tried
using something like the misc interface instead, which handles almost
all of this logic for you?

Posting your code is a good way for others to help as well, otherwise
answering vague questions is very hard.

good luck!

greg k-h



More information about the Kernelnewbies mailing list