Re: cdevsw_add() vs make_dev()
--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--
討論串 (同標題文章)
完整討論串 (本文為第 4 之 5 篇):