Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 May 2008 12:16:27 +0300
From:      Kostik Belousov <kostikbel@gmail.com>
To:        Andriy Gapon <avg@icyb.net.ua>
Cc:        freebsd-stable@freebsd.org, Norberto Meijome <freebsd@meijome.net>
Subject:   Re: Is it possible to create a directory under /dev?
Message-ID:  <20080523091627.GK29770@deviant.kiev.zoral.com.ua>
In-Reply-To: <4836660D.1070801@icyb.net.ua>
References:  <20080523110556.485afa89@ayiin> <4836660D.1070801@icyb.net.ua>

next in thread | previous in thread | raw e-mail | index | archive | help

--DfnuYBTqzt7sVGu3
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, May 23, 2008 at 09:37:01AM +0300, Andriy Gapon wrote:
> Norberto Meijome <freebsd@meijome.net> wrote:
> >On Thu, 22 May 2008 10:02:08 +0300
> >Andriy Gapon <avg@icyb.net.ua> wrote:
> >
> >>But, by the way, there is a (slightly) more valid reason to want to=20
> >>create a directory under /dev, I recently had it. For one non-standard=
=20
> >>third-party application I needed to create a link to existing device in=
=20
> >>a certain subdirectory. I.e.:
> >>/dev/subdirX/device -> /dev/deviceX
> >>And I couldn't do that.
> >>Or maybe link operation for devfs just needs to be taught about creatin=
g=20
> >>subdirectories on demand. I don't know.
> >
> >you can create links with devfs - man devfs.conf
> >[...]
> >link    This action creates a symbolic link named arg that points to
> >             devname, the name of the device created by devfs(5).
> >[..]
>=20
> I do know that.
> Maybe I wasn't clear enough: "/dev/deviceX" was existing device node and=
=20
> I needed to create "/dev/subdirX/device" link, where directory=20
> "/dev/subdirX" didn't exist.
> Any help on this?

As an ugly workaround, you may create an directory on ufs filesystem,
populate it with needed symlinks, and then make a symlink /dev/subdirX ->
the directory.

I would prefer not to allow users to create the directories on the devfs.
On the other hand, I like Solaris approach with devfs on /devices and /dev
being populated with short symlinks to ../devices.

--DfnuYBTqzt7sVGu3
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)

iEYEARECAAYFAkg2i2oACgkQC3+MBN1Mb4hrBACgoejZ/alwX03AaOG6uU4LC2XN
l6oAn0aFP6N2WEmRt7TxGpYBQnDyFCJn
=F0gP
-----END PGP SIGNATURE-----

--DfnuYBTqzt7sVGu3--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080523091627.GK29770>