From: Kay Sievers <kay.sievers@vrfy.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: usblp attributes split in udevinfo
Date: Wed, 14 Feb 2007 07:18:49 +0000 [thread overview]
Message-ID: <1171437529.3830.7.camel@pim.off.vrfy.org> (raw)
In-Reply-To: <20070213230520.64fe8c2b.aahrend@web.de>
On Wed, 2007-02-14 at 00:53 +0100, Arne Ahrend wrote:
> On Tue, 13 Feb 2007 23:10:25 +0100
> "Kay Sievers" <kay.sievers@vrfy.org> wrote:
>
> > The next group has
> > > DRIVERS="usblp", but a device which is not suitable for printing. Using 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?
> >
> > What are you trying to do?
>
>
> Thanks for replying. I am trying to create a persistent symlink (e.g. HL-1050) to the lp0 device.
>
> The modalias or ieee1284_id attributes are in one group, but KERNEL="lp0" 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 created automatically?
>
> It used to be as easy as
>
> SUBSYSTEM="usb", sysfs{modalias}="usb:v04F9p0002d0100dc00dsc00dp00ic07isc01ip02", SYMLINK="HL-1050"
>
> but that now gives a link to device nodes like /dev/usbdev2.3_ep82 instead of /dev/usb/lp0.
You are matching the "usb_device" event.
Try:
KERNEL="lp*", ATTRS{ieee1284_id}="*HL-1050*", SYMLINK+="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=join.php&p=sourceforge&CIDÞVDEV
_______________________________________________
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
next prev parent reply other threads:[~2007-02-14 7:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-13 22:05 usblp attributes split in udevinfo Arne Ahrend
2007-02-13 22:10 ` Kay Sievers
2007-02-13 23:53 ` Arne Ahrend
2007-02-14 0:02 ` Matthias Schwarzott
2007-02-14 7:18 ` Kay Sievers [this message]
2007-02-14 17:40 ` Arne Ahrend
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1171437529.3830.7.camel@pim.off.vrfy.org \
--to=kay.sievers@vrfy.org \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).