Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Oct 2015 19:10:21 +0000 (UTC)
From:      Will Parsons <varro@nodomain.invalid>
To:        freebsd-questions@freebsd.org
Subject:   Re: creating devices under a regular file system
Message-ID:  <slrnn1vugt.2ph.varro@anukis.local>
References:  <slrnn1tpbe.130j.varro@anukis.local> <20151015020509.GA27010@neutralgood.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday, 14 Oct 2015 10:05 PM -0400, kpneal@pobox.com wrote:
> On Wed, Oct 14, 2015 at 11:29:50PM +0000, Will Parsons wrote:
>> I would like to know how to create a few selected devices
>> (viz. dev/null and dev/urandom) under a regular directory tree using
>> devfs.
>
> Did you see the devfs man page? "man 8 devfs"

Yes, but I'm still puzzled.

> You need to create a /etc/devfs.rules file creating a new ruleset that
> lists what you want available. You need to add that new ruleset to devfs,
> and then mount a new devfs in the appropriate place (~/FOSSIL/dev).

OK, but where's that done?  There's no devfs entry in /etc/fstab.

> I have a devfs.rules file I cobbled together below. Note that I don't
> know devfs very well _at all_, so if I've made any errors I hope someone
> will chime in.
>
> [devfsrules_unhide_bind=5]
> add hide
> add path log unhide
> add path null unhide
> #add path zero unhide
> #add path crypto unhide
> add path random unhide
> add path urandom unhide

But those get created under /dev, so I guess I need another devfs to
create devices under ~/FOSSIL/dev?

-- 
Will




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?slrnn1vugt.2ph.varro>