cdevsw_add() vs make_dev()

Simon corecode Schubert corecode at
Tue Oct 5 16:51:25 PDT 2004

+++ 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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00001.pgp
Type: application/octet-stream
Size: 187 bytes
Desc: "Description: PGP signature"
URL: <>

More information about the Kernel mailing list