public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* Re: IDs
@ 2003-01-07  2:19 Andries.Brouwer
  2003-01-07  3:15 ` IDs Patrick Mansfield
  0 siblings, 1 reply; 5+ messages in thread
From: Andries.Brouwer @ 2003-01-07  2:19 UTC (permalink / raw)
  To: Andries.Brouwer, patmans
  Cc: linux-kernel, linux-scsi, linux-usb-devel, mdharm-kernel, zwane

> We can tell if the id sdev->name should be unique by looking at
> the first byte (it is not unique if the value is 'Z'),
> SCSI_UID_UNKNOWN.

Such things are nontrivial.

% cat /sysfs/devices/ide-scsi/0:0:0:0/0:0:0:0/name
SHP      CD-Writer+ 8200 [

Here the serial number consists of the '[' only.
(And this is not because of truncation.)

I can see your intentions, but view these names/ids more
like heuristics than like reliable data.
More or less like mount, which will usually figure out the
filesystem type for you, but no guarantees are given.

And where we have heuristics only, it cannot be "wrong"
to truncate at 50 positions or so. The heuristic does
not become appreciably weaker.

(And, in case of heuristics, I like 98% heuristics better
than 99.98% heuristics. They keep you honest. No important
things will depend upon them. With 99.98% one may forget
that it is a heuristic.)

Andries

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

end of thread, other threads:[~2003-01-07 18:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-07  2:19 IDs Andries.Brouwer
2003-01-07  3:15 ` IDs Patrick Mansfield
2003-01-07 10:55   ` IDs Andries.Brouwer
2003-01-07 17:07     ` IDs Greg KH
2003-01-07 18:02     ` IDs Patrick Mansfield

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox