* MODALIAS to stay
@ 2007-07-10 8:08 Andreas Jellinghaus
2007-07-10 9:48 ` Kay Sievers
2007-07-10 11:11 ` Andreas Jellinghaus
0 siblings, 2 replies; 3+ messages in thread
From: Andreas Jellinghaus @ 2007-07-10 8:08 UTC (permalink / raw)
To: linux-hotplug
I have udev rules lines like this:
SYSFS{idVendor}="0973", SYSFS{idProduct}="0001", RUN+="/lib/udev/openct_usb"
and
SYSFS{bInterfaceClass}="0b", SYSFS{bInterfaceSubClass}="00",
SYSFS{bInterfaceProtocol}="00" RUN+="/lib/udev/openct_usb"
Now I see the kernel has a MODALIAS line that contains all the information I
need. "usb:v0973p0001*" or "usb:*ic0Bisc00*" would match the same way as
using sysfs.
So I wonder: can I match MODALIAS like this somehow in udev rules?
and is there any reason not to use MODALIAS?
as far as I know the kernel creates the MODALIAS line in
drivers/usb/core/driver.c so I guess it is always part of an event and thus
shouldn't have any timing problem, right?
Thanks for your help.
Regards, Andreas
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: MODALIAS to stay
2007-07-10 8:08 MODALIAS to stay Andreas Jellinghaus
@ 2007-07-10 9:48 ` Kay Sievers
2007-07-10 11:11 ` Andreas Jellinghaus
1 sibling, 0 replies; 3+ messages in thread
From: Kay Sievers @ 2007-07-10 9:48 UTC (permalink / raw)
To: linux-hotplug
On 7/10/07, Andreas Jellinghaus <aj@dungeon.inka.de> wrote:
> I have udev rules lines like this:
> SYSFS{idVendor}="0973", SYSFS{idProduct}="0001", RUN+="/lib/udev/openct_usb"
> and
> SYSFS{bInterfaceClass}="0b", SYSFS{bInterfaceSubClass}="00",
> SYSFS{bInterfaceProtocol}="00" RUN+="/lib/udev/openct_usb"
>
> Now I see the kernel has a MODALIAS line that contains all the information I
> need. "usb:v0973p0001*" or "usb:*ic0Bisc00*" would match the same way as
> using sysfs.
>
> So I wonder: can I match MODALIAS like this somehow in udev rules?
ENV{MODALIAS}="usb:v0973p0001*|usb:*ic0Bisc00*" should match.
> and is there any reason not to use MODALIAS?
No, it should be fine.
> as far as I know the kernel creates the MODALIAS line in
> drivers/usb/core/driver.c so I guess it is always part of an event and thus
> shouldn't have any timing problem, right?
It should always be in the environment, yes.
Kay
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: MODALIAS to stay
2007-07-10 8:08 MODALIAS to stay Andreas Jellinghaus
2007-07-10 9:48 ` Kay Sievers
@ 2007-07-10 11:11 ` Andreas Jellinghaus
1 sibling, 0 replies; 3+ messages in thread
From: Andreas Jellinghaus @ 2007-07-10 11:11 UTC (permalink / raw)
To: linux-hotplug
Kay Sievers wrote:
>> So I wonder: can I match MODALIAS like this somehow in udev rules?
>
> ENV{MODALIAS}="usb:v0973p0001*|usb:*ic0Bisc00*" should match.
ok, thanks.
> It should always be in the environment, yes.
thanks, will rewrite my rules file to use this instead of sysfs.
Regards, Andreas
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-07-10 11:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-10 8:08 MODALIAS to stay Andreas Jellinghaus
2007-07-10 9:48 ` Kay Sievers
2007-07-10 11:11 ` Andreas Jellinghaus
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).