* udev: rules ignore whitespace but not case
@ 2004-11-15 20:40 Eric C. Cooper
2004-11-15 20:51 ` Kay Sievers
2004-11-15 21:12 ` Greg KH
0 siblings, 2 replies; 3+ messages in thread
From: Eric C. Cooper @ 2004-11-15 20:40 UTC (permalink / raw)
To: linux-hotplug
I use a rule like this
BUS="scsi", SYSFS{model}="iPod", KERNEL="sd[a-z]2", SYMLINK="ipod"
and it works even though the model field is actually
"iPod "
But a rule like this
BUS="scsi", SYSFS{vendor}="KINGSTON", KERNEL="sd[a-z]1", SYMLINK="flash"
fails with my flash disk because the vendor field is actually "Kingston".
I think that if the pattern matching is going to trim whitespace, it
should also ignore case. That would be more consistent and more
resilient to errors.
--
Eric C. Cooper e c c @ c m u . e d u
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
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: udev: rules ignore whitespace but not case
2004-11-15 20:40 udev: rules ignore whitespace but not case Eric C. Cooper
@ 2004-11-15 20:51 ` Kay Sievers
2004-11-15 21:12 ` Greg KH
1 sibling, 0 replies; 3+ messages in thread
From: Kay Sievers @ 2004-11-15 20:51 UTC (permalink / raw)
To: linux-hotplug
On Mon, 2004-11-15 at 15:40 -0500, Eric C. Cooper wrote:
> I use a rule like this
> BUS="scsi", SYSFS{model}="iPod", KERNEL="sd[a-z]2", SYMLINK="ipod"
> and it works even though the model field is actually
> "iPod "
>
> But a rule like this
> BUS="scsi", SYSFS{vendor}="KINGSTON", KERNEL="sd[a-z]1", SYMLINK="flash"
> fails with my flash disk because the vendor field is actually "Kingston".
>
> I think that if the pattern matching is going to trim whitespace, it
> should also ignore case. That would be more consistent and more
> resilient to errors.
That's on purpose. The whitespace is ignored only if your key value does
not end with whitespace. So it's still possible to distinguish fields
with differences only in the whitespace.
Thanks,
Kay
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
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: udev: rules ignore whitespace but not case
2004-11-15 20:40 udev: rules ignore whitespace but not case Eric C. Cooper
2004-11-15 20:51 ` Kay Sievers
@ 2004-11-15 21:12 ` Greg KH
1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2004-11-15 21:12 UTC (permalink / raw)
To: linux-hotplug
On Mon, Nov 15, 2004 at 03:40:46PM -0500, Eric C. Cooper wrote:
> I use a rule like this
> BUS="scsi", SYSFS{model}="iPod", KERNEL="sd[a-z]2", SYMLINK="ipod"
> and it works even though the model field is actually
> "iPod "
>
> But a rule like this
> BUS="scsi", SYSFS{vendor}="KINGSTON", KERNEL="sd[a-z]1", SYMLINK="flash"
> fails with my flash disk because the vendor field is actually "Kingston".
>
> I think that if the pattern matching is going to trim whitespace, it
> should also ignore case. That would be more consistent and more
> resilient to errors.
No, we want to only trim whitespace, as that's the most common issue for
people. Case sensitivity is still important to keep.
thanks,
greg k-h
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
_______________________________________________
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:[~2004-11-15 21:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-15 20:40 udev: rules ignore whitespace but not case Eric C. Cooper
2004-11-15 20:51 ` Kay Sievers
2004-11-15 21:12 ` Greg KH
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).