From owner-svn-src-all@FreeBSD.ORG Sun Nov 1 22:37:39 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C364E106568D; Sun, 1 Nov 2009 22:37:39 +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 7E9648FC18; Sun, 1 Nov 2009 22:37:39 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 6AB126D41B; Sun, 1 Nov 2009 22:37:38 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 328AA84503; Sun, 1 Nov 2009 23:37:38 +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> Date: Sun, 01 Nov 2009 23:37:38 +0100 In-Reply-To: <20091101220533.GL1293@hoeg.nl> (Ed Schouten's message of "Sun, 1 Nov 2009 23:05:33 +0100") Message-ID: <86tyxdj2h9.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-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Nov 2009 22:37:39 -0000 Ed Schouten writes: > > Dag-Erling Sm=C3=B8rgrav writes: > > identified an individual device handled by that driver. FreeBSD no > > longer makes that distinction; each device has a unique system-wide > > minor number, and the major number is always zero. However, the > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > As pointed out earlier, this is not true. Major numbers can be non-zero. > > | #define major(x) ((int)(((u_int)(x) >> 8)&0xff)) > > Devices 256-511 will have a major number of 1, etc. So: Each device has a unique system-wide device number; the minor number contains the eight least-significant bits, and the major number contains the rest. (device numbers are currently unsigned int; is there a reason not to make them explicitly 32 bits wide, i.e. uint32_t?) > Apart from that, I think there is also a fair amount of overlap with the > COMPATIBILITY section of the same manpage. Yeah, but who reads those? :) DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no