In message <[EMAIL PROTECTED]>, Dima Dorfman write
s:
>> 2) I'm not sure I like the strncmp(.., "md", 2) stuff, as that means that
>> it would also match any other device name that might begin with md, which
>> potentially might not be provided by the md driver.  This is currently (I
>> suspect) hypothetical as we don't have any other drivers beginning with
>> md, but it would be nice not to preclude that in the future.  Restricting
>> all possible disk device names to two letters, of which the second is
>> always d, is not a scalable approach.  That said, writing an easy matching
>> function without that assumption probably isn't all that easy, either.
>
>Assuming that a device name must consist of letters (which I suspect
>is the case), it's fairly trivial; just check that what follows 'md'
>is a number.
>
>Here's a patch against what I sent in previously to do that.  The
>original with this included can be found at
>http://www.unixfreak.org/~dima/home/md-list3.diff.

Hi Dima,

This is great work.

The "md" problem should really be solved by adding
        #define MD_NAME "md"
to <sys/mdioctl.h> and using this in both the driver and the mdconfig
program.

Can I get you to incorporate that in your patch ?

--
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED]         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to