restrict to only one block-arg (as last) param per command
This commit is contained in:
parent
15ee6f9dc7
commit
9ebedc24f2
8 changed files with 31 additions and 71 deletions
|
@ -50,8 +50,8 @@ struct grub_extcmd_context
|
|||
|
||||
struct grub_arg_list *state;
|
||||
|
||||
/* Script parameters, if any. */
|
||||
struct grub_script **script_params;
|
||||
/* Script parameter, if any. */
|
||||
struct grub_script *script;
|
||||
};
|
||||
typedef struct grub_extcmd_context *grub_extcmd_context_t;
|
||||
|
||||
|
@ -74,6 +74,6 @@ void grub_unregister_extcmd (grub_extcmd_t cmd);
|
|||
|
||||
grub_err_t
|
||||
grub_extcmd_dispatcher (struct grub_command *cmd, int argc, char **args,
|
||||
struct grub_script **scripts);
|
||||
struct grub_script *script);
|
||||
|
||||
#endif /* ! GRUB_EXTCMD_HEADER */
|
||||
|
|
|
@ -62,7 +62,7 @@ struct grub_script_arg
|
|||
char *str;
|
||||
|
||||
/* Parsed block argument. */
|
||||
struct grub_script *block;
|
||||
struct grub_script *script;
|
||||
|
||||
/* Next argument part. */
|
||||
struct grub_script_arg *next;
|
||||
|
@ -73,7 +73,7 @@ struct grub_script_argv
|
|||
{
|
||||
unsigned argc;
|
||||
char **args;
|
||||
struct grub_script **scripts;
|
||||
struct grub_script *script;
|
||||
};
|
||||
|
||||
/* A complete argument. It consists of a list of one or more `struct
|
||||
|
@ -234,8 +234,6 @@ void grub_script_argv_free (struct grub_script_argv *argv);
|
|||
int grub_script_argv_next (struct grub_script_argv *argv);
|
||||
int grub_script_argv_append (struct grub_script_argv *argv, const char *s);
|
||||
int grub_script_argv_split_append (struct grub_script_argv *argv, char *s);
|
||||
int grub_script_argv_script_append (struct grub_script_argv *argv,
|
||||
struct grub_script *s);
|
||||
|
||||
struct grub_script_arglist *
|
||||
grub_script_create_arglist (struct grub_parser_param *state);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue