From owner-freebsd-hackers Tue Feb 13 13:51:38 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from iguana.aciri.org (iguana.aciri.org [192.150.187.36]) by hub.freebsd.org (Postfix) with ESMTP id B5F7537B65D for ; Tue, 13 Feb 2001 13:51:36 -0800 (PST) Received: (from rizzo@localhost) by iguana.aciri.org (8.11.1/8.11.1) id f1DLpVZ38897; Tue, 13 Feb 2001 13:51:31 -0800 (PST) (envelope-from rizzo) From: Luigi Rizzo Message-Id: <200102132151.f1DLpVZ38897@iguana.aciri.org> Subject: Re: character device driver In-Reply-To: <200102132124.f1DLOTW41431@harmony.village.org> from Warner Losh at "Feb 13, 2001 2:24:29 pm" To: imp@harmony.village.org (Warner Losh) Date: Tue, 13 Feb 2001 13:51:26 -0800 (PST) Cc: daverufino@btinternet.com, hackers@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL43 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > 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. cheers luigi ----------------------------------+----------------------------------------- Luigi RIZZO, luigi@iet.unipi.it . ACIRI/ICSI (on leave from Univ. di Pisa) http://www.iet.unipi.it/~luigi/ . 1947 Center St, Berkeley CA 94704 Phone: (510) 666 2927 ----------------------------------+----------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message