From owner-cvs-src@FreeBSD.ORG Wed Jun 6 06:57:32 2007 Return-Path: X-Original-To: cvs-src@freebsd.org Delivered-To: cvs-src@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 13D1A16A46D; Wed, 6 Jun 2007 06:57:32 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id A224413C468; Wed, 6 Jun 2007 06:57:31 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id 19E0A17380; Wed, 6 Jun 2007 06:57:30 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.1/8.14.1) with ESMTP id l566vVn3071023; Wed, 6 Jun 2007 06:57:32 GMT (envelope-from phk@critter.freebsd.dk) To: "Daniel O'Connor" From: "Poul-Henning Kamp" In-Reply-To: Your message of "Wed, 06 Jun 2007 11:40:10 +0930." <200706061141.04765.doconnor@gsoft.com.au> Date: Wed, 06 Jun 2007 06:57:31 +0000 Message-ID: <71022.1181113051@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: src-committers@freebsd.org, cvs-src@freebsd.org, cvs-all@freebsd.org, delphij@freebsd.org, ceri@submonkey.net, "M. Warner Losh" Subject: Re: cvs commit: src/usr.sbin/sysinstall installUpgrade.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jun 2007 06:57:32 -0000 In message <200706061141.04765.doconnor@gsoft.com.au>, "Daniel O'Connor" writes : >On Wednesday 06 June 2007 07:44, M. Warner Losh wrote: >> : '$1~/\\dev\\/(aacd|ad|afd|amrd|ar|da|idad|ipsd|mfid|mlxd|twed)/ && >> : \ $2~/\\/$/ {print substr($1, 1, index($1, \"s\") - 1)}' >> : /etc/fstab`"); >> : >> : where the regex is built from every device name in device_names >> : (which even then doesn't cater for GEOM where devices might be >> : called anything). This is something that would require a build >> : tool, which is why I haven't done it yet. >> >> "mmcsd" is also a disk. > >Why not iterate over the output of sysctl -n kern.disks? Wrong answer. Right answer: Why not read it from sysctl kern.geom.confxml -- 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.