From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 29 06:48:37 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 E5D4016A4CE for ; Wed, 29 Oct 2003 06:48:37 -0800 (PST) Received: from isis.telemach.net (isis.telemach.net [213.143.65.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id CBC5143FBD for ; Wed, 29 Oct 2003 06:48:34 -0800 (PST) (envelope-from rp@telemach.net) Received: by isis.telemach.net (Postfix, from userid 1002) id D56147A319; Wed, 29 Oct 2003 15:48:29 +0100 (CET) Date: Wed, 29 Oct 2003 15:48:29 +0100 From: "(rp)" To: freebsd-hackers@freebsd.org Message-ID: <20031029144829.GA82230@isis.telemach.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Subject: make_dev & cdevsw_add 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: Wed, 29 Oct 2003 14:48:38 -0000 Hello! 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