Directory in /dev

Marc Lörner marc.loerner at hob.de
Fri Nov 24 13:07:14 UTC 2006


Thanks,
now it does, what I wanted!
Sometimes one really doesn't see the wood for the trees!

Marc

On Friday 24 November 2006 14:00, you wrote:
> In message: <20061124.055337.-432838076.imp at bsdimp.com>
>
>             "M. Warner Losh" <imp at bsdimp.com> writes:
> : In message: <200611241225.07481.marc.loerner at hob.de>
> :
> :             Marc Lörner <marc.loerner at hob.de> writes:
> : : Hello,
> : : is it possible to create/make a subdirectory under /dev,
> : : or is it generally forbidden to do that?
> : :
> : : I found nothing by googling or reading the archives of the freebsd
> : : mailing lists. I even found nothing by slightly looking into the kernel
> : : code.
> : :
> : : Does anyone have some suggestions or pointers for me?
> :
> : makedev in your driver with a slash:
> :
> : make_dev(cdevsw, minor, uid, gid, perm, "fred/ford%d", unit);
> :
> : or if you are creating a disk device, set the d_name similarly.
>
> I should have added that creating the first device in a subdirectory
> automatically creates that subdirectory.  Removing the last device
> automatically deletes that subdirectory.  You can't create a
> subdirectory just because you want it there, however.
>
> Warner


More information about the freebsd-drivers mailing list