linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
To: linux-hotplug@vger.kernel.org
Subject: Matching semantics for version numbers....
Date: Tue, 20 Mar 2001 21:12:47 +0000	[thread overview]
Message-ID: <marc-linux-hotplug-98512282728951@msgid-missing> (raw)

[-- 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 --]

             reply	other threads:[~2001-03-20 21:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-20 21:12 Matthew Dharm [this message]
2001-03-21  6:12 ` Matching semantics for version numbers David Brownell
2001-03-21 18:54 ` Matthew Dharm
2001-03-22 19:23 ` David Brownell
2001-03-22 19:50 ` Matthew Dharm

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=marc-linux-hotplug-98512282728951@msgid-missing \
    --to=mdharm-usb@one-eyed-alien.net \
    --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).