From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 30 12:01:40 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EF99316A4CE for ; Thu, 30 Oct 2003 12:01:40 -0800 (PST) Received: from isis.telemach.net (isis.telemach.net [213.143.65.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id DD9C743F3F for ; Thu, 30 Oct 2003 12:01:37 -0800 (PST) (envelope-from rp@telemach.net) Received: by isis.telemach.net (Postfix, from userid 1002) id B12CD7A142; Thu, 30 Oct 2003 21:01:25 +0100 (CET) Date: Thu, 30 Oct 2003 21:01:25 +0100 From: "(rp)" To: freebsd-hackers@freebsd.org Message-ID: <20031030200125.GA55692@isis.telemach.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Subject: make_dev & cdevsw_add (Is there anyone that could answer this ?) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2003 20:01:41 -0000 Hello (again)! I would kindly request explanation on how are cdevsw_add and make_dev related ? Maybe short example also with focus on cdevsw_add. Thing is i do not understand the function of cdevsw_add when i have make_dev. Also if there is any real good document that describes most of cdev related stuff i would appriciate if someone gives me an url. Second thing that i would like to know is: struct cdevsw { d_open_t *d_open; When a process calls open on character device and d_open function is called would it be possible to determine the file descriptor returned by the open system call on that device that is returned to the process from d_open ? That is i would like to implement character device that wouldn't require /dev/somedev[0-9]+ number of devices but only /dev/somedev and would identify the open/close/ read/write operations by pid and fd instead of dev_t's minor number. re RP