[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Block parameter support for GRUB script
From: |
BVK Chaitanya |
Subject: |
Re: [PATCH] Block parameter support for GRUB script |
Date: |
Thu, 22 Jul 2010 15:53:56 +0530 |
Attached is an updated patch for block-arguments support. It
restricts the syntax to only one block-argument per command, that too,
only as the last parameter. This is a requirement to make menuentry
as a regular command.
Since this is a BASH incompatible feature, some notes are necessary:
1. Block arguments feature makes use of '{' and '}' characters for
its syntax. So we need to escape these characters, if we want to pass
them to commands as regular parameters.
2. Text between '{' and '}' must be in a valid GRUB script commands
syntax. Since functions are not commands in GRUB script, one cannot
define new functions with in a block argument.
3. Block arguments can be nested to arbitrary depths, that is,
commands with-in a block argument may themselves use block arguments,
etc.
4. A block argument parameter is passed to commands' implementation
as a single parameter (whitespaces and all within { and } are part of
the same parameter). Enclosing characters, { and } are also passed as
part of the parameter.
5. Block argument parameter is also passed as a pre-parsed
grub_script object, to all extended commands (grub_extcmd_t).
Commands that want to save this object needs to take a reference using
grub_script_get/grub_script_put methods.
This feature is currently being used by new menuentry-as-a-command
implementation. I will send the patch for it shortly.
regards,
bvk.chaitanya
block-arg.patch
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH] Block parameter support for GRUB script,
BVK Chaitanya <=