From owner-cvs-all@FreeBSD.ORG Sun Oct 24 10:17:26 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EF5B116A4CE; Sun, 24 Oct 2004 10:17:26 +0000 (GMT) Received: from smtp.des.no (flood.des.no [217.116.83.31]) by mx1.FreeBSD.org (Postfix) with ESMTP id AA14E43D49; Sun, 24 Oct 2004 10:17:26 +0000 (GMT) (envelope-from des@des.no) Received: by smtp.des.no (Pony Express, from userid 666) id 99CB95310; Sun, 24 Oct 2004 12:17:25 +0200 (CEST) Received: from dwp.des.no (des.no [80.203.228.37]) by smtp.des.no (Pony Express) with ESMTP id A0C905313; Sun, 24 Oct 2004 12:17:17 +0200 (CEST) Received: by dwp.des.no (Postfix, from userid 2602) id 67BE8B861; Sun, 24 Oct 2004 12:17:17 +0200 (CEST) To: Scott Long References: <200410240938.i9O9cf4U083000@repoman.freebsd.org> <417B7AB2.9060004@freebsd.org> From: des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=) Date: Sun, 24 Oct 2004 12:17:17 +0200 In-Reply-To: <417B7AB2.9060004@freebsd.org> (Scott Long's message of "Sun, 24 Oct 2004 03:49:38 -0600") Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on flood.des.no X-Spam-Level: X-Spam-Status: No, hits=0.0 required=5.0 tests=AWL autolearn=no version=2.64 cc: cvs-src@freebsd.org cc: src-committers@freebsd.org cc: cvs-all@freebsd.org Subject: Re: cvs commit: src/usr.sbin/config lang.l X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Oct 2004 10:17:27 -0000 --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Scott Long writes: > Sigh. I'm sorry I didn't have more time to discuss this. It's indeed a > simple fix (which I had already done and tested), but I was stuck on > fixing all of the memory leaks that are present. I also wanted to add > a 'includedir' token to the grammar so you would override the defaults. Sorry, I didn't realize you were already working on this. It seemed like a very simple and useful change and noone had provided any patches, so I jumped on it. I have more stuff coming - the attached patch allows for multiple comma-separated device names on each device / nodevice line. I can take care of includedir as well if you want me to. DES --=20 Dag-Erling Sm=F8rgrav - des@des.no --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=config.diff Index: config.y =================================================================== RCS file: /home/ncvs/src/usr.sbin/config/config.y,v retrieving revision 1.64 diff -u -r1.64 config.y --- config.y 30 Aug 2004 23:03:56 -0000 1.64 +++ config.y 24 Oct 2004 10:15:35 -0000 @@ -246,20 +246,40 @@ ; Device_spec: - DEVICE Dev + DEVICE Dev_list + | + NODEVICE NoDev_list + ; + +Dev_list: + Dev_list COMMA Device + | + Device + ; + +NoDev_list: + NoDev_list COMMA NoDevice + | + NoDevice + ; + +Device: + Dev = { - newopt(&opt, devopt($2), ns("1")); + newopt(&opt, devopt($1), ns("1")); /* and the device part */ - newdev($2); - } | - NODEVICE Dev + newdev($1); + } + +NoDevice: + Dev = { - char *s = devopt($2); + char *s = devopt($1); rmopt(&opt, s); free(s); /* and the device part */ - rmdev($2); + rmdev($1); } ; %% --=-=-=--