From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1NHQ3G-0005Q0-Pn for mharc-grub-devel@gnu.org; Sun, 06 Dec 2009 17:58:02 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NHQ3E-0005Oz-Hq for grub-devel@gnu.org; Sun, 06 Dec 2009 17:58:00 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NHQ39-0005Nk-Oa for grub-devel@gnu.org; Sun, 06 Dec 2009 17:57:59 -0500 Received: from [199.232.76.173] (port=37877 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHQ39-0005Nh-IW for grub-devel@gnu.org; Sun, 06 Dec 2009 17:57:55 -0500 Received: from mail-fx0-f213.google.com ([209.85.220.213]:63936) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NHQ39-00026a-88 for grub-devel@gnu.org; Sun, 06 Dec 2009 17:57:55 -0500 Received: by fxm5 with SMTP id 5so4123401fxm.8 for ; Sun, 06 Dec 2009 14:57:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type; bh=cXRAvh47ToEyNCglZsQxrnZIjtFNWBlajFtJZBu74YU=; b=eKW/Xb4JB8VzM6zTFyRPG4MGzjP643QfIv9gYhnZtUjlXVVwv06T+zIx4sZwulAiiy 0lcrs+63ul/ZkFargDbqAWN73OQEWnC5PGbaFatGAtyKO3ZfxlbHzusZC8oWtaMGvnHe fypRd1FT5FLDqYJpcgQU7POZW5podOZVFZpkI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; b=Y8g9S2GwiCbpF/USU6VDzpUJ8tn3jpXnmm0zDP7uNlRQ7RhGo8ZHZVCNQTriY4MEP7 6PBd2n/C2ZNaS0n843rI+wVLq+lhD1lidI96BlNw1wvjwevWoZqBM4hgfGjVCMiRKu/B HiTmzSaI37SvRymVxajYVcoO4Hf/4tnDmBsyw= Received: by 10.102.168.11 with SMTP id q11mr1839230mue.135.1260140273270; Sun, 06 Dec 2009 14:57:53 -0800 (PST) Received: from ?192.168.178.55? (p5B0CF695.dip.t-dialin.net [91.12.246.149]) by mx.google.com with ESMTPS id y37sm13444733mug.47.2009.12.06.14.57.52 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 06 Dec 2009 14:57:52 -0800 (PST) Message-ID: <4B1C36EF.1030203@googlemail.com> Date: Sun, 06 Dec 2009 23:57:51 +0100 From: Andreas Born User-Agent: Thunderbird 2.0.0.23 (X11/20090827) MIME-Version: 1.0 To: GRUB2 Devel References: <20091013-211116.sv74720.58002@savannah.gnu.org> <4AD72362.3030805@gmail.com> In-Reply-To: <4AD72362.3030805@gmail.com> Content-Type: multipart/mixed; boundary="------------050900000106030500080806" X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [bug #27695] parser.sh ignores the closing quote when preceeded by a variable X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 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: Sun, 06 Dec 2009 22:58:01 -0000 This is a multi-part message in MIME format. --------------050900000106030500080806 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Problem exists still as of r1917. I've attached a rediffed version of Vladimir's patch. The behaviour without the patch changed (it's even more confusing), but it's basically still the same: grub> echo "$root" grub>" hd0,1 Vladimir 'phcoder' Serbinenko schrieb: > Andreas Born wrote: > >> URL: >> >> >> Summary: parser.sh ignores the closing quote when preceeded >> by a variable >> >> > Attached patch should fix this bug > >> Project: GNU GRUB >> Submitted by: shador >> Submitted on: Di 13 Okt 2009 21:11:16 GMT >> Category: Terminal >> Severity: Major >> Priority: 5 - Normal >> Item Group: Software Error >> Status: None >> Privacy: Public >> Assigned to: None >> Originator Name: >> Originator Email: >> Open/Closed: Open >> Discussion Lock: Any >> Release: >> Release: SVN >> Reproducibility: Every Time >> Planned Release: None >> >> _______________________________________________________ >> >> Details: >> >> The problem is reproducible with this example: >> >> >>> set blub=blob >>> echo $blub >>> >>> >> blob >> >> >>> echo "${blub}" >>> >>> >> blob >> >> >>> echo "$blub" >>> >>> >>> >> => fails, the closing quote is ignored >> >> >>> echo "$blub"" >>> >>> >> blob >> => works as workaround >> >> The real trouble starts with strings containing spaces. But it can be fixed, >> as shown, by adding another quote at the end or using ${...}. >> >> This was tested with beta~4. >> >> >> >> >> _______________________________________________________ >> >> Reply to this item at: >> >> >> >> _______________________________________________ >> Nachricht geschickt von/durch Savannah >> http://savannah.gnu.org/ >> >> >> >> _______________________________________________ >> Bug-grub mailing list >> Bug-grub@gnu.org >> http://lists.gnu.org/mailman/listinfo/bug-grub >> >> >> > > > --------------050900000106030500080806 Content-Type: text/x-patch; name="varquote.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="varquote.diff" === modified file 'script/lexer.c' --- script/lexer.c 2009-11-23 15:37:33 +0000 +++ script/lexer.c 2009-11-29 00:16:30 +0000 @@ -350,9 +350,11 @@ if (! (check_varstate (newstate))) { if (state->state == GRUB_PARSER_STATE_VARNAME2 - || state->state == GRUB_PARSER_STATE_QVARNAME2) - nextchar (state); - state->state = newstate; + || state->state == GRUB_PARSER_STATE_QVARNAME2) + { + nextchar (state); + state->state = newstate; + } break; } @@ -378,7 +380,6 @@ buffer[bufpos++] = 0; - state->state = newstate; yylval->arg = grub_script_arg_add (parsestate, yylval->arg, GRUB_SCRIPT_ARG_TYPE_VAR, buffer); grub_dprintf ("scripting", "vartoken=`%s'\n", buffer); --------------050900000106030500080806--