From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1YrrBp-00083v-DR for mharc-grub-devel@gnu.org; Mon, 11 May 2015 13:08:25 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45795) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YrrBm-00082p-HV for grub-devel@gnu.org; Mon, 11 May 2015 13:08:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YrrBl-0004Q7-HT for grub-devel@gnu.org; Mon, 11 May 2015 13:08:22 -0400 Received: from mo6-p00-ob.smtp.rzone.de ([2a01:238:20a:202:5300::9]:49614) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YrrBl-0004MP-7M for grub-devel@gnu.org; Mon, 11 May 2015 13:08:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1431364099; l=834; s=domk; d=aepfle.de; h=In-Reply-To:Content-Transfer-Encoding:Content-Disposition: Content-Type:MIME-Version:References:Subject:Cc:To:From:Date; bh=qCYCXV1adodqItcYG96TsSAiXKK3U03x4TmX/szWmzs=; b=ISvQ2cimLi/I7+j4VxUilqyP7Kd5Y+gY829XE17+8Jm0j7y8ygK9YpoFCpNb2j/ELUP tfwauDMbSialrX83v0M0FYf2BHHkplh4ua8QV/cSeO1vgQ4U7G14KSCmPbVOq/z2qVRxC uHmat4zHU71wXIxuwUEjpGmpS9hXNVOjLZA= X-RZG-AUTH: :P2EQZWCpfu+qG7CngxMFH1J+yackYocTD1iAi8x+OWi/zfN1cLnBYfssVY1SE5ClEYfb5sQvxDNUdfk3GFAM3xrxaZN0YQ== X-RZG-CLASS-ID: mo00 Received: from probook.fritz.box ([2001:a60:10a3:eb01:1ec1:deff:feb9:bb48]) by smtp.strato.de (RZmta 37.5 AUTH) with ESMTPSA id z01e4dr4BH8IN5H (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve sect571r1 with 571 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Mon, 11 May 2015 19:08:18 +0200 (CEST) Received: by probook.fritz.box (Postfix, from userid 1000) id 82EA4502A7; Mon, 11 May 2015 19:08:12 +0200 (CEST) Date: Mon, 11 May 2015 19:08:11 +0200 From: Olaf Hering To: Andrei Borzenkov Subject: Re: [PATCH] Parse commandline in grub-xen Message-ID: <20150511170809.GA28276@aepfle.de> References: <20150511094320.GB17438@aepfle.de> <20150511104130.GA29233@aepfle.de> <20150511110143.GA3595@aepfle.de> <20150511115148.GA18883@aepfle.de> <20150511150339.3f303f6a@opensuse.site> <20150511121554.GA3180@aepfle.de> <20150511195314.0b9ae949@opensuse.site> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20150511195314.0b9ae949@opensuse.site> User-Agent: Mutt/1.5.22.rev6346 (2013-10-29) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a01:238:20a:202:5300::9 Cc: The development of GNU GRUB X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 May 2015 17:08:23 -0000 On Mon, May 11, Andrei Borzenkov wrote: > В Mon, 11 May 2015 14:15:54 +0200 > Olaf Hering пишет: > > > On Mon, May 11, Andrei Borzenkov wrote: > > > > > Either by allowing ${grub.arg.XXX} (not sure if current grammar accepts > > > it) or by adding getarg command, something like > > > > > > getarg --name debug --set debug > > > > What would such format buy us? > > Make it possible for you, as script author, have control over which > arguments and how are used. 'if [ -n "${name}" ]' is simpler than 'getarg --name name --set name;if [ -n "${name}"]'. Not sure if 'if $cmd' is supposed to work, but either way your proposal looks strange. And regarding $debug itself, with my change its set very early before any script runs. Perhaps that is useful to debug early issues. Olaf