Am 05.03.2012 13:54, schrieb Vladimir 'φ-coder/phcoder' Serbinenko: >> option with an optional argument. By this we would have had what you >> preference and my way too. Regarding optional arguments the option >> handling in GRUB is actually broken by design, so this is, >> unfortunately, not an option. > When i implemented my patches, i wanted to use both ways: a command line > Again it's unfortunate that noone noticed it when it was committed and > now we're stuck with it.
You should think about that again. GRUB is broken regarding that and it should be fixed anyway. Right now it seems that there is only one command which uses GRUB_ARG_OPTION_OPTIONAL so maybe it's one of the last chances to have a cheap fix. The (only!?) place where an optional option is used is the --set option for the search command. The manual entry for search states: search [--file|--label|--fs-uuid] [--set [var]] [--no-floppy] name The description is wrong. For --set it's only possible to omit "var" iff another option is following the --set option. OK: search --file --set --nofloppy /boot/grub/grub.cfg OK: search --file --set -- /boot/grub/grub.cfg ERROR: search --file --set /boot/grub/grub.cfg It's either needed to correct the manual or to fix the code. If it's decided that the code cannot be fixed (for whatever reasons) the use of optional option arguments should be strongly discouraged or even forbidden then. Andreas _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel