From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1UbDCR-0002Be-R9 for mharc-grub-devel@gnu.org; Sat, 11 May 2013 13:03:11 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58396) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UbDCO-0002Ah-UE for grub-devel@gnu.org; Sat, 11 May 2013 13:03:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UbDCO-0002yl-3e for grub-devel@gnu.org; Sat, 11 May 2013 13:03:08 -0400 Received: from mail-ee0-f46.google.com ([74.125.83.46]:59812) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UbDCN-0002wq-Sv for grub-devel@gnu.org; Sat, 11 May 2013 13:03:08 -0400 Received: by mail-ee0-f46.google.com with SMTP id e49so819341eek.33 for ; Sat, 11 May 2013 10:03:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:x-enigmail-version:content-type; bh=H7xqmM8XJlA2ZPp7LneOmU1MX2Agt05NLaqNuaTOODM=; b=mphx/FPW6haKueN+MrpDqn5b9NOrtnHyAIIi01m7d8Ak+GEnbbrUPCUM6ib/ywZ6Zj OVkfm/bBSMh4vcdZv+NomTgwavM8BkoLE2Yt8bNyoqVr6nk7alsH50FBPCon6WUhW47/ IkVIjKRVLiIRcVb/i2I8TwQa7B/7f6X6GEn4Nno3P7s8SiTKh+5WSlZDH9ZjvMGFJtLW 5smoxka0ojQyt03XKxi6GghwH9Neysjbkd38pSVnB8guSaQiOobP/ddV6XoWVxIXb0rn d+0HQUcxc14WNxNsu086HSihhUC5YAI+QDlIqpPNBH0WocYcmretRZfk4uuEZ2Ne6/lQ vAeQ== X-Received: by 10.14.108.1 with SMTP id p1mr56317822eeg.31.1368291787065; Sat, 11 May 2013 10:03:07 -0700 (PDT) Received: from debian.x201.phnet (245-188.1-85.cust.bluewin.ch. [85.1.188.245]) by mx.google.com with ESMTPSA id l6sm10994438eem.9.2013.05.11.10.03.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 11 May 2013 10:03:06 -0700 (PDT) Message-ID: <518E79C2.701@gmail.com> Date: Sat, 11 May 2013 19:02:58 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 MIME-Version: 1.0 To: The development of GNU GRUB Subject: Re: New command eval. References: <1367240132.58582.YahooMailNeo@web120204.mail.ne1.yahoo.com> <20130501185934.3f2b9c28@opensuse.site> <518578B3.5040003@gmail.com> <20130511203534.52499628@opensuse.site> In-Reply-To: <20130511203534.52499628@opensuse.site> X-Enigmail-Version: 1.4.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig6289E3A22D2F903310A4B4AA" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 74.125.83.46 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: Sat, 11 May 2013 17:03:11 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig6289E3A22D2F903310A4B4AA Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 11.05.2013 18:35, Andrey Borzenkov wrote: > + grub_size_t size =3D argc; /* +1 for final zero */ > + char *str, *p; > + grub_err_t ret; > + > + if (argc =3D=3D 0) > + return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("missing arguments"))= ; > + eval with no arguments returns success in bash, to match this behaviour, it should be GRUB_ERR_NONE and no use of grub_error > + for (i =3D 0; i < argc; i++) > + size +=3D grub_strlen (argv[i]); > + > + str =3D p =3D grub_malloc (size); > + if (!str) > + return grub_errno; > + > + for (i =3D 0; i < argc; i++) > + { > + grub_strcpy (p, argv[i]); > + p +=3D grub_strlen (argv[i]); These 2 operations should be condensed by using grub_stpcpy > + *p++ =3D ' '; >- grub_script_execute_sourcecode (script, 0, dummy); >+ grub_script_execute_sourcecode (script); (in menu_entry.c) here you need a new scope for consistency. --------------enig6289E3A22D2F903310A4B4AA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREKAAYFAlGOeckACgkQNak7dOguQgkrSgD/THMeOgLVPDynGP1m21reNBnx uW5BB7kjPx5vz6U3VIQBAKCkShmxiEAmDfXpJO3+/ySbk0He8021rYrsJSLrDgel =fC5K -----END PGP SIGNATURE----- --------------enig6289E3A22D2F903310A4B4AA--