From owner-freebsd-hackers Sat Feb 24 8:22:18 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from critter.freebsd.dk (flutter.freebsd.dk [212.242.40.147]) by hub.freebsd.org (Postfix) with ESMTP id 05DDB37B491; Sat, 24 Feb 2001 08:22:15 -0800 (PST) (envelope-from phk@critter.freebsd.dk) Received: from critter (localhost [127.0.0.1]) by critter.freebsd.dk (8.11.1/8.11.1) with ESMTP id f1OGMQM08077; Sat, 24 Feb 2001 17:22:26 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: Dima Dorfman Cc: Robert Watson , freebsd-hackers@freebsd.org Subject: Re: Listing configured md(4) devices In-Reply-To: Your message of "Thu, 22 Feb 2001 16:43:00 PST." <20010223004300.F09643E09@bazooka.unixfreak.org> Date: Sat, 24 Feb 2001 17:22:26 +0100 Message-ID: <8075.983031746@critter> From: Poul-Henning Kamp Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <20010223004300.F09643E09@bazooka.unixfreak.org>, 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 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 phk@FreeBSD.ORG | 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 majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message