All of lore.kernel.org
 help / color / mirror / Atom feed
* Checking parametres that are not inside an option
@ 2007-06-12 11:57 adrian15
  2007-06-12 17:19 ` Marco Gerards
  0 siblings, 1 reply; 2+ messages in thread
From: adrian15 @ 2007-06-12 11:57 UTC (permalink / raw)
  To: The development of GRUB 2

If you take a look at search.c you can see that the -s parametrer is
checked outside the command thanks to the ARG_TYPE_STRING constant.

{"set", 's', GRUB_ARG_OPTION_OPTIONAL, "set a variable to the first
device found", "VAR", ARG_TYPE_STRING}


If I want not to check if an argument command that it IS NOT inside an
option is something (a disk, i.e.) or not... how do I do it?

I mean I want something like:

map (hd0) (hd1)

to be checked outside the command without using:

map -disk1 (hd0) -disk2 (hd1)
and the correspondent option definition at map.c

how do I do it ?

adrian15




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Checking parametres that are not inside an option
  2007-06-12 11:57 Checking parametres that are not inside an option adrian15
@ 2007-06-12 17:19 ` Marco Gerards
  0 siblings, 0 replies; 2+ messages in thread
From: Marco Gerards @ 2007-06-12 17:19 UTC (permalink / raw)
  To: The development of GRUB 2

adrian15 <adrian15@raulete.net> writes:

> If you take a look at search.c you can see that the -s parametrer is
> checked outside the command thanks to the ARG_TYPE_STRING constant.
>
> {"set", 's', GRUB_ARG_OPTION_OPTIONAL, "set a variable to the first
> device found", "VAR", ARG_TYPE_STRING}
>
>
> If I want not to check if an argument command that it IS NOT inside an
> option is something (a disk, i.e.) or not... how do I do it?
>
> I mean I want something like:
>
> map (hd0) (hd1)
>
> to be checked outside the command without using:
>
> map -disk1 (hd0) -disk2 (hd1)
> and the correspondent option definition at map.c
>
> how do I do it ?

That's not possible with the current code.  You would have to add such
check yourself, which should not be too hard.

--
Marco




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-06-12 17:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-12 11:57 Checking parametres that are not inside an option adrian15
2007-06-12 17:19 ` Marco Gerards

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.