Date: Sat, 28 Feb 2009 16:34:53 +0200 From: Kostik Belousov <kostikbel@gmail.com> To: Michael Sperber <sperber@deinprogramm.de> Cc: freebsd-stable@freebsd.org Subject: Re: devd question Message-ID: <20090228143453.GX41617@deviant.kiev.zoral.com.ua> In-Reply-To: <y9lljrq1z89.fsf@deinprogramm.de> References: <y9lljrq1z89.fsf@deinprogramm.de>
next in thread | previous in thread | raw e-mail | index | archive | help
--HQLHrCACpVdwMl/9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Feb 28, 2009 at 02:13:10PM +0100, Michael Sperber wrote: >=20 > I'm trying to make devd run an stty command whenever a USB serial device > is attached. Unfortunately, $device-name is ucom[0-9] and the device > names are /dev/cuaU[0-9] - how do I get the correct name in the device > action? I haven't found a way to extract the number by itself, so I'm > stuck with specifying a separate rule for each number, like so: >=20 > attach 100 { > device-name "ucom0"; > action "stty -f /dev/cuaU0.init raw"; > }; >=20 > Help would be much appreciated! There are some other notifications that are send through devctl when cdev is created. They have system set to DEVFS, subsystem to CDEV, and type CREATE. The data is the /dev node name. I am not sure how to assign the action in the devd. --HQLHrCACpVdwMl/9 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkmpS40ACgkQC3+MBN1Mb4jWggCgpq+xfdHfoUpwdjachoOcP3Qv c5QAmwTodBWsoq8MclGpJrZbyBtM5Ha9 =6Swi -----END PGP SIGNATURE----- --HQLHrCACpVdwMl/9--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090228143453.GX41617>