Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Feb 2001 15:02:00 -0700
From:      Warner Losh <imp@harmony.village.org>
To:        Luigi Rizzo <rizzo@aciri.org>
Cc:        daverufino@btinternet.com, hackers@FreeBSD.ORG
Subject:   Re: character device driver 
Message-ID:  <200102132202.f1DM20W41714@harmony.village.org>
In-Reply-To: Your message of "Tue, 13 Feb 2001 13:51:26 PST." <200102132151.f1DLpVZ38897@iguana.aciri.org> 
References:  <200102132151.f1DLpVZ38897@iguana.aciri.org>  

next in thread | previous in thread | raw e-mail | index | archive | help
In message <200102132151.f1DLpVZ38897@iguana.aciri.org> Luigi Rizzo writes:
: > In message <20010213193150.A882@btinternet.com> David Rufino writes:
: > : I'm writing a character device driver in which each minor device can be
: > : opened more than once.  When a device is opened is there a way to associate
: > : some private data for each opened instance ? Thanks.
: > 
: > No.  You only get one close call and in the kernel all instances of a
: > minor device are treated identically.
: 
: this is not true anymore, there is some special flag you can
: specify in cdevsw or so which passes all close calls to the driver.

It is only half untrue.  There's a special flag to get all calls to
close, but you have no way of knowing which instance of the minor
device is being closed because they are all identical in the kernel's
eyes.

Warner


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200102132202.f1DM20W41714>