Date: Mon, 02 Nov 2009 00:59:16 +0100 From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no> To: Ed Schouten <ed@80386.nl> Cc: Kostik Belousov <kostikbel@gmail.com>, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Christian Brueffer <brueffer@freebsd.org> Subject: Re: svn commit: r198768 - head/sbin/mknod Message-ID: <86pr81iyp7.fsf@ds4.des.no> In-Reply-To: <20091101223948.GN1293@hoeg.nl> (Ed Schouten's message of "Sun, 1 Nov 2009 23:39:48 %2B0100") 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>
next in thread | previous in thread | raw e-mail | index | archive | help
Ed Schouten <ed@80386.nl> writes: > Dag-Erling Sm=C3=B8rgrav <des@des.no> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86pr81iyp7.fsf>