Re: cdevsw_add() vs make_dev()

看板DFBSD_kernel作者時間21年前 (2004/10/06 08:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串4/5 (看更多)
--lrZ03NoBR/3+SXJZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline +++ Matthew Dillon [05/10/04 10:04 -0700]: > :cdevsw_add(&svd_cdevsw, -1, device_get_unit(dev)); > :What is this call doing differently than what make_dev provides? > This DFly methodology has the ability to easily slice out portions > of the minor number address space, to reserve a sub-area for which > the clone function will be called, to override a device space with > another device space (which is how the disk layering works instead > of all the terrible hacks FreeBSD-4 does), and to properly dispose of > devices within the device space when a device is closed or unloaded. > And a bunch of other things. Wouldn't it be cleaner to give every driver its own major number? Maybe I really need to read 4.4 D&I or something like that to understand what I'm talking about. cheers simon --lrZ03NoBR/3+SXJZ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBYzMEr5S+dk6z85oRAlquAKCfp3RJzH2LyXJIwO12tf5lKYBkyQCbBZJi UcC2lrltBsCsUic4zJaYu6w= =mo/G -----END PGP SIGNATURE----- --lrZ03NoBR/3+SXJZ--
文章代碼(AID): #11OpNQ00 (DFBSD_kernel)
文章代碼(AID): #11OpNQ00 (DFBSD_kernel)