Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 04 Apr 96 09:56:08 PST
From:      "Brett Glass" <Brett_Glass@ccgate.infoworld.com>
To:        Michael Smith <msmith@atrad.adelaide.edu.au>
Cc:        msmith@atrad.adelaide.edu.au, jkh@time.cdrom.com, hardware@freebsd.org
Subject:   Re: Some solutions to disk problems.... I think.
Message-ID:  <9603048286.AA828638254@ccgate.infoworld.com>

next in thread | raw e-mail | index | archive | help
> Here's a suggestion.  Write a function that performs simple string
> matching using a table of ten IDs.  Write ten functions which each parse
> for these ID's.  Compare the size of the two.  Repeat the process for
> twenty, and so on.

I hope you are jesting! Only the most abysmal programmer would have to
write ten functions to replace ten table entries.

As the number of drives increases, code gains a greater and greater
advantage as it is able to parse prefixes, suffixes, and partial model
numbers for groups of drives. If the SCSI code really has to use a wildcard
parser, it might actually be WORTH considering doing a shared regular
expression parser (wildcards are a bit weak for the task). Regular
expressions are, in a sense, programs.

Seagate alone has several HUNDRED model numbers. In my hard disk guide,
they go on for PAGES in fine print. And that's just one brand.  Recognizing
substrings of different lengths, and knowing when to look for suffixes as
well as the corresponding CDC and Conner model numbers, will be key to
identifying drives efficiently.

--Brett




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9603048286.AA828638254>