From owner-freebsd-stable@FreeBSD.ORG Sat Feb 28 14:34:59 2009 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E2501065670 for ; Sat, 28 Feb 2009 14:34:59 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id D6A5B8FC15 for ; Sat, 28 Feb 2009 14:34:58 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1LdQHI-000Dhg-LC; Sat, 28 Feb 2009 16:34:56 +0200 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id n1SEYsss097242 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 28 Feb 2009 16:34:54 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id n1SEYskH051737; Sat, 28 Feb 2009 16:34:54 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id n1SEYrCd051736; Sat, 28 Feb 2009 16:34:53 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 28 Feb 2009 16:34:53 +0200 From: Kostik Belousov To: Michael Sperber Message-ID: <20090228143453.GX41617@deviant.kiev.zoral.com.ua> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HQLHrCACpVdwMl/9" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1LdQHI-000Dhg-LC 015c8a297e8dd6b7c31fdc4c890cc0dd X-Terabit: YES Cc: freebsd-stable@freebsd.org Subject: Re: devd question X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Feb 2009 14:34:59 -0000 --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--