From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 25 10:44:29 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BEAF106566B for ; Wed, 25 Jan 2012 10:44:29 +0000 (UTC) (envelope-from etnapierala@googlemail.com) Received: from mail-we0-f182.google.com (mail-we0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 20AD78FC14 for ; Wed, 25 Jan 2012 10:44:28 +0000 (UTC) Received: by werg1 with SMTP id g1so5932323wer.13 for ; Wed, 25 Jan 2012 02:44:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=sender:date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=63VdtmkW4oh5HUo0da0GsQIJJFWUUJmQ0saAAntVb8M=; b=q0+ajP2RPiuoorHMiGyHy0lprfF+oTn/xCwJ7o7wDVOV56A9ogOht/stjmSMQnkBlC 2l1nk581zM2dPc5nopbctRrFRQhiJPTR2IEckMbj1R5qmq7EPwiAWbQRICpgHQmAzh1+ dCDJw6EVu6JAltQR41IA2FZPQMURu72rq35Sg= Received: by 10.216.133.204 with SMTP id q54mr2632918wei.2.1327488268035; Wed, 25 Jan 2012 02:44:28 -0800 (PST) Received: from geosci (45.81.datacomsa.pl. [195.34.81.45]) by mx.google.com with ESMTPS id fr8sm41886wib.10.2012.01.25.02.44.26 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 25 Jan 2012 02:44:27 -0800 (PST) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Wed, 25 Jan 2012 11:44:23 +0100 From: Edward Tomasz =?utf-8?Q?Napiera=C5=82a?= To: freebsd-hackers@freebsd.org Message-ID: <20120125104423.GA52830@geosci> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Subject: mdconfig(8) argument parsing. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jan 2012 10:44:29 -0000 Patch below changes the way mdconfig(8) parses its arguments: it removes the ordering requirement and makes error messages more descriptive; it also makes the code more readable by getting rid of the 'cmdline' variable. Now, the mdconfig(8) syntax is somewhat weird, and I'm not sure I tested all the ways people use it. Thus, testing is welcome. http://people.freebsd.org/~trasz/mdconfig-parsing.diff -- If you cut off my head, what would I say? Me and my head, or me and my body?