From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LrD4h-0001VR-Ql for mharc-grub-devel@gnu.org; Tue, 07 Apr 2009 11:18:55 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LrD4g-0001UE-26 for grub-devel@gnu.org; Tue, 07 Apr 2009 11:18:54 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LrD4f-0001TK-6T for grub-devel@gnu.org; Tue, 07 Apr 2009 11:18:53 -0400 Received: from [199.232.76.173] (port=36261 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LrD4e-0001Sw-Ry for grub-devel@gnu.org; Tue, 07 Apr 2009 11:18:52 -0400 Received: from fg-out-1718.google.com ([72.14.220.155]:39240) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LrD4e-00041v-1U for grub-devel@gnu.org; Tue, 07 Apr 2009 11:18:52 -0400 Received: by fg-out-1718.google.com with SMTP id 19so917506fgg.7 for ; Tue, 07 Apr 2009 08:18:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=uljUbYAodWx6PtV7YK8Pbsny5d7k8JR13SeP3ay7yV8=; b=wPPpN6XLh+Ua1q0KHS04jJ4Was1jZHf/JMgjw7zoSoTTyr22f1o81Cu9NZQxpPshXz ryby9S7pHwECgr5AH7fMH/L/0+CAzGv6K5Ylh0zd1ghS3MuVeglE3QXG/QsamJNaD5Ha wN+QcXyuiSigldGCG/ZTKAbE1Kj//VRoeo7oA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=G+51pRsEK+tIN4Rp7yU1rp/2TO/b98xpl++IqKNI6Y6+xIQqhyN7cwhCNGBdlqWd3G Zro7agt+eVKeCpJ9hCA02FqLvN9qnWNYRgf06JacbpML6ixMw0KcJOThiASoCKCezhSh T+IxxiWy2Zh8rzS1jf8sTb8PMqlkg8S4tx/DA= Received: by 10.86.80.5 with SMTP id d5mr250213fgb.59.1239117530369; Tue, 07 Apr 2009 08:18:50 -0700 (PDT) Received: from ?192.168.1.2? (251-127.3-85.cust.bluewin.ch [85.3.127.251]) by mx.google.com with ESMTPS id d6sm8661350fga.2.2009.04.07.08.18.49 (version=SSLv3 cipher=RC4-MD5); Tue, 07 Apr 2009 08:18:50 -0700 (PDT) Message-ID: <49DB6EDC.80900@gmail.com> Date: Tue, 07 Apr 2009 17:18:52 +0200 From: phcoder User-Agent: Thunderbird 2.0.0.21 (X11/20090318) MIME-Version: 1.0 To: The development of GRUB 2 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [PATCH] LUA script engine for grub2 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2009 15:18:54 -0000 Is it all from scratch? Wau. Very nice job. Unfortunately I don't know any lua but I'll test this as time permits Bean wrote: > Hi, > > This patch integrate the LUA script engine to grub2. Before applying > this patch, you should apply the split module patch split_3.diff > first. > > BTW, I forget to add Makefile.in the previous split_3.diff, so that > handler.lst will not be generated, I include it in this one. > > To try the LUA engine, you can enter command line, and use: > > parser.lua > > Inside lua, you can use grub.run to execute grub commands, such as: > > grub.run("ls", "-l") > > To switch back to sh, you can run this command: > > grub.run("parser.sh") > > Here is a small lua program to solve the hanoi tower: > > function hanoi(n,a,b,c) > if (n == 1) then > print ("move from", a, "to", c) > else > hanoi (n-1, a, c, b) > hanoi (1, a, b, c) > hanoi (n-1, b, a, c) > end > end > hanoi (3, 1, 2, 3) > > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel -- Regards Vladimir 'phcoder' Serbinenko