grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: grub-shell: Pass -no-pad to xorriso when building floppy images


From: Andrey Borzenkov
Subject: Re: grub-shell: Pass -no-pad to xorriso when building floppy images
Date: Thu, 16 Jan 2014 23:13:53 +0400

В Thu, 16 Jan 2014 19:56:16 +0100
"Thomas Schmitt" <address@hidden> пишет:

> Hi,
> 
> > There is no second "--". grub-mkrescue --help tries to say, that
> > everything after "--" is simply passed on to xorriso. What is
> > confusing, is "or any of the mkisofs options" in previous sentence
> > which implies that "--" is not needed.
> 
> It used to work the way which is still in the docs.
> 
> See
>   http://git.savannah.gnu.org/cgit/grub.git/tree/util/grub-mkrescue.in?id=2.00
> 
> Its arguments are interpreted by
> 
>   while test $# -gt 0
>   do
>      ...
>      case "$option" in
>      ...
>      *)
>         source="${source} ${option} $@"; break ;;
>      esac
>   done
> 
> I.e the unrecognized arguments are added to the list of
> source files which is later submitted to the xorriso -as mkisofs
> emulation:
> 
>   # build iso image
>   "${xorriso}" -as mkisofs ... ${source}
> 
> Among the xorriso arguments, the "--" has the effect that xorriso
> will leave mkisofs emulation and interpret the following arguments
> as its native commands and their parameters.
> 

Ah, right, sorry.

> 
> But the new C code obviously thinks too much when seeing
> single-dash arguments, which it should handle as xorriso arguments.
> And it eats "--". At least if it is the first non-mkrescue argument.
> 
> 
> So:
> 
> What argument interpretation behavior is grub-mkrescue 2.02
> supposed to show ?
> 
> The one that is currently documented and matches grub-mkrescue.in 
> of 2.00 ?
> 
> Or the one that is result of using grub-core/gnulib/argp-parse.c ?

Yes. It is standard behavior where everything after "--" is interpreted
as non-option. You need it to avoid unknown option error from parser.

> The latter would need to be explored and documented, then.
> 

I think it is enough to say that everything after first "--" is passed
onto xorriso. The fact that second "--" will enter native xorriso is
documented in xorriso manual; anyone who would like to make use of this
feature probably knows it.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]