From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1cyFiQ-0002KU-Dy for mharc-grub-devel@gnu.org; Wed, 12 Apr 2017 06:41:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36316) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cyFiO-0002KM-0m for grub-devel@gnu.org; Wed, 12 Apr 2017 06:41:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cyFiN-00055V-2f for grub-devel@gnu.org; Wed, 12 Apr 2017 06:41:32 -0400 Received: from mail-yb0-x22f.google.com ([2607:f8b0:4002:c09::22f]:33765) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cyFiM-000559-TZ for grub-devel@gnu.org; Wed, 12 Apr 2017 06:41:31 -0400 Received: by mail-yb0-x22f.google.com with SMTP id l201so5652872ybf.0 for ; Wed, 12 Apr 2017 03:41:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=g01v5Hfzbxrg55inkx8/4sjoH/ioZ7tHQZHiMh+T/u8=; b=L8fM5MddbEUM+bcQPRfLJSdeHnzMZDx/9bM6tRDmp9e6ZYjlJJ2ejj9oQNo4pAYYKY rzhcfAfWXkrMz6EDHZoxYcLVaINQELIubYnHOITlqlGxVU4PlCTdhDVBXwQSAYToFXUd D4NLu0G68jNYhqIgP0peDIgAqHj08eRlPECFuLZZjZ+b5aI762kOY9VCtaPdDGLKVkxI jHkNB8RocAEPzW6rLx5bZ+LATBmhPnB2vujdIG652+aGn9P80CDPyo5xX99zLCHg5F3m oD/UObp0bNpzBwGoYIQTJctOVtu1OaCtc7uGwD76YbF/HIT0LinaYsjtd5AQAvWKkkef N/ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=g01v5Hfzbxrg55inkx8/4sjoH/ioZ7tHQZHiMh+T/u8=; b=thhFXAUiUVEYOPbGy3ECxt53XouWhRSLzDfPChXLRNW5chjZk/OytBIptmNki2X2hd uxguhx+5nOOBqU+7fti+kIJUA9apL7M6UhX1/CjHa2J+1TLBG3dN4DKogjl8cPWgLFaN 9HJXmmfcR17IRrlJ8dhEbKZArcqbbqyyIU70l7FQCqz2V8kPqhb6hqvRYGyub5z6eVO3 UWiVWXWO61lOCV+23uo876vLJTAlanFW4t3AhNx2fgJJ3wz+k/gKbkb5QqYUL5scaMaa rIbQ1aqFGe296wsbrgAvnLd7253SLQtoqUX1UHFrJn7ijYa/jyGEi55yenhX4WS1oTvg wDrQ== X-Gm-Message-State: AN3rC/7dHggc63fguOHF2kEEssGx0X379z/Hb0PPdO9pNWsSvu0epdY/+IXaxnSlUI8A0IF3FxcLdoMtmYtHpw== X-Received: by 10.37.176.133 with SMTP id f5mr9136002ybj.182.1491993689872; Wed, 12 Apr 2017 03:41:29 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "Vladimir 'phcoder' Serbinenko" Date: Wed, 12 Apr 2017 10:41:19 +0000 Message-ID: Subject: Re: Contribution To: The development of GNU GRUB Content-Type: multipart/alternative; boundary=f403045e5470e45d2b054cf5d919 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4002:c09::22f X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Apr 2017 10:41:33 -0000 --f403045e5470e45d2b054cf5d919 Content-Type: text/plain; charset=UTF-8 On Wed, Apr 12, 2017, 20:37 Nicole wrote: > I have written two small, simple modules to address limitations I found > in in Grub. > > 1. does simple arithmetic - nothing fancy. It's invoked by using > something like this: > > insmod arithmetic > arithmetic --set fred --min 2 -- max 10 "1" "+" "2" > > the operators supported are unary -,!; binary +,-,/,*,%,<,<=,<.<=,!=,== > --set works in the usual way. If the result is greater than --max, the > --min value is returned and vice versa; this useful for cycling round a > group of partitions in a round-robin fashion > Can you have a look if we can have bash syntax $((...)) and $[...] instead? It's more compact and nicer. > > 2. diskinfo.mod introduces two commands: disklabel, diskuuid which > return the label and uuid of the specified disk partition. This is > useful where, having decided which partition, amongst several, to boot, > you can fill in the appropriate value in the "root=UUID=" or > "root=label=" Linux kernel parameter. > Have a look at probe command. Does it cover your usecase? > > I looked for details on how to submit new modules, but failed to find > anything. How do I go about this? > Just send patches here. > > Nicole > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel > --f403045e5470e45d2b054cf5d919 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On Wed, Apr 12, 2017, 2= 0:37 Nicole <nicole.king464@= gmail.com> wrote:
I have w= ritten two small, simple modules to address limitations I found
in in Grub.

1. does simple arithmetic - nothing fancy. It's invoked by using
something like this:

insmod arithmetic
arithmetic --set fred --min 2 -- max 10 "1" "+" "2= "

the operators supported are unary -,!; binary +,-,/,*,%,<,<=3D,<.&= lt;=3D,!=3D,=3D=3D
--set works in the usual way. If the result is greater than --max, the
--min value is returned and vice versa; this useful for cycling round a
group of partitions in a round-robin fashion
Can you have a look if we can have bash syntax $((...)) an= d $[...] instead? It's more compact and nicer.

2. diskinfo.mod introduces two commands: disklabel, diskuuid which
return the label and uuid of the specified disk partition. This is
useful where, having decided which partition, amongst several, to boot,
you can fill in the appropriate value in the "root=3DUUID=3D" or<= br class=3D"gmail_msg"> "root=3Dlabel=3D" Linux kernel parameter.
=
Have a look at probe command. Does it cover your us= ecase?

I looked for details on how to submit new modules, but failed to find
anything. How do I go about this?
Just send patches here.

Nicole


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/l= istinfo/grub-devel
--f403045e5470e45d2b054cf5d919--