From owner-svn-src-head@FreeBSD.ORG Sun Nov 1 23:59:18 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B58B4106566C; Sun, 1 Nov 2009 23:59:18 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 703BD8FC08; Sun, 1 Nov 2009 23:59:18 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 4E7FD6D41C; Sun, 1 Nov 2009 23:59:17 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 312BB844D2; Mon, 2 Nov 2009 00:59:17 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Ed Schouten References: <200911011825.nA1IPBQ2031333@svn.freebsd.org> <20091101184322.GP2147@deviant.kiev.zoral.com.ua> <20091101202242.GK1293@hoeg.nl> <86y6mpj4fs.fsf@ds4.des.no> <20091101220533.GL1293@hoeg.nl> <86tyxdj2h9.fsf@ds4.des.no> <20091101223948.GN1293@hoeg.nl> Date: Mon, 02 Nov 2009 00:59:16 +0100 In-Reply-To: <20091101223948.GN1293@hoeg.nl> (Ed Schouten's message of "Sun, 1 Nov 2009 23:39:48 +0100") Message-ID: <86pr81iyp7.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Kostik Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Christian Brueffer Subject: Re: svn commit: r198768 - head/sbin/mknod X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Nov 2009 23:59:18 -0000 Ed Schouten writes: > Dag-Erling Sm=C3=B8rgrav writes: > > (device numbers are currently unsigned int; is there a reason not to > > make them explicitly 32 bits wide, i.e. uint32_t?) > I think it should explicitly use dev_t or something, right? Ah, I was looking in the wrong header; it is indeed a uint32_t. So: b | c Type of device. Historically, block devices were provided to allow byte-level access to hardware that required data to be read or written in fixed-sized blocks. FreeBSD no longer has block devices, and all device nodes should be created as character devices. However, the distinction between block and character devices is still important when creating device nodes on a filesystem intended for use by older systems. (it's been so long since we dropped block devices that I actually had to look up the details in an old copy of D&I) major, minor Historically, a device number consisted of two parts: the major number, which identified a device driver, and the minor number, which identified an individual device handled by that driver. FreeBSD no longer makes that distinction. Instead, every device in the system has a unique 32-bit device number. For compatibility with software that still expects separate major and minor numbers, this 32-bit device number is split into a 24-bit major number and an 8-bit minor number. However, the distinction between major and minor numbers is still important when creating device nodes on a filesystem intended for use by older systems. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no