From: Kay Sievers Date: Wed, 14 Feb 2007 07:18:49 +0000 Subject: Re: usblp attributes split in udevinfo Message-Id: <1171437529.3830.7.camel@pim.off.vrfy.org> List-Id: References: <20070213230520.64fe8c2b.aahrend@web.de> In-Reply-To: <20070213230520.64fe8c2b.aahrend@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org On Wed, 2007-02-14 at 00:53 +0100, Arne Ahrend wrote: > On Tue, 13 Feb 2007 23:10:25 +0100 > "Kay Sievers" wrote: >=20 > > The next group has > > > DRIVERS=3D"usblp", but a device which is not suitable for printing. U= sing its ATTRS{modalias} for my udev printer rules > > > I get symlinks to device nodes like > > > crw-rw---- 1 root root 254, 14 2007-02-13 18:53 /dev/usbdev2.= 3_ep82 > > > and not to /dev/usb/lp0. > > > > > > Can anyone shed some light on this? > >=20 > > What are you trying to do? >=20 >=20 > Thanks for replying. I am trying to create a persistent symlink (e.g. HL-= 1050) to the lp0 device. >=20 > The modalias or ieee1284_id attributes are in one group, but KERNEL=3D"lp= 0" is in another. Udev can match on _all_ parent devices, the attributes don't need to be at the device itself. ATTRS walk up all parent devices to match, ATTR looks only at the device itself. > So what is the best way to have a symlink /dev/HL-1050 -> /dev/usb/lp0 cr= eated automatically? >=20 > It used to be as easy as >=20 > SUBSYSTEM=3D"usb", sysfs{modalias}=3D"usb:v04F9p0002d0100dc00dsc00dp00ic= 07isc01ip02", SYMLINK=3D"HL-1050" >=20 > but that now gives a link to device nodes like /dev/usbdev2.3_ep82 instea= d of /dev/usb/lp0. You are matching the "usb_device" event. Try: KERNEL=3D"lp*", ATTRS{ieee1284_id}=3D"*HL-1050*", SYMLINK+=3D"HL-1050" Kay ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=DEVD= EV _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel