linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Matching semantics for version numbers....
@ 2001-03-20 21:12 Matthew Dharm
  2001-03-21  6:12 ` David Brownell
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Matthew Dharm @ 2001-03-20 21:12 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 1295 bytes --]

I recently discovered a small problem in the code that matches devices to
drivers in the way version numbers are handled.

The tests used against version numbers are < and > -- while this doesn't
seem like a problem at first, consider usb-storage where we need to have
one entry for a device up to rev 3.00, and a different entry for devices
rev 3.00 and higher.  The current mechanism means that the first entry must
test against less than 3.00 and the second against greater than 2.99, which
is counter-intuitive at best. 

I'd like to change these to <= and >= -- and yes, I understand what a major
change that is.  The drivers which use the version numbers would have to be
changed, and so would the hotplug scripts.  But I wanted to throw this idea
out there for consideration.  It's certainly much easier to maintain the
code with the <= and >= semantics, since I can give a definate termination
point to my entries.  With these semantics, the above example uses <= 2.99
and >= 3.00 as the test values respectively, which is much clearer.

Matt

-- 
Matthew Dharm                              Home: mdharm-usb@one-eyed-alien.net 
Maintainer, Linux USB Mass Storage Driver

THEY CASTRATED MY QUAKE BITS! I WANT THEM BACK!!!!
					-- Greg
User Friendly, 3/27/1998

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-03-22 19:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-03-20 21:12 Matching semantics for version numbers Matthew Dharm
2001-03-21  6:12 ` David Brownell
2001-03-21 18:54 ` Matthew Dharm
2001-03-22 19:23 ` David Brownell
2001-03-22 19:50 ` Matthew Dharm

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).