grub-devel
[Top][All Lists]
Advanced

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

Re: About the CLI of both grub-mkrescue versions


From: Andrei Borzenkov
Subject: Re: About the CLI of both grub-mkrescue versions
Date: Sun, 28 Sep 2014 20:17:49 +0400

В Tue, 23 Sep 2014 10:12:12 +0200
"Thomas Schmitt" <address@hidden> пишет:

> Hi,
> 
> i recently advertised grub-mkrescue as replacement of
> script snippets for creating ISO images with legacy GRUB.
> 
> But it is not very appealing to the audience if i have
> to mention the different interpretation of argument "--"
> by the shell script of GRUB-2.00 and by the C program
> of the git master branch.
> 
> The C program demands "--" before any custom options for
> xorriso -as mkisofs are accepted. Omitting it lets argp_parser()
> return ARGP_ERR_UNKNOWN rather than adding the mkisofs option
> to the xorriso argument list.
> The shell script forwards "--" to xorriso -as mkisofs,
> where it ends the mkisofs emulation. Afterwards, the additional
> mkisofs options are not understood by xorriso.
> 
> We discussed this a while ago in the thread following
>   http://lists.gnu.org/archive/html/grub-devel/2014-01/msg00074.html
> There was no conclusion.
> 
> 
> If this CLI change shall persist, then there needs to be
> some indication for scripts, whether the "--" is mandatory or
> harmful.
> Further, the documentation of grub-mkrescue needs to be updated.

Care to send a patch for both help output and documentation?

> Including the help text in the C code, which currently describes
> the behavior of the shell script.
> 
> In my personal view, it would be better to keep the behavior of
> GRUB-2.00. E.g. by replacing in grub-mkrescue.c line 229
>     return ARGP_ERR_UNKNOWN;
> by a call of xorriso_push() ... i guess ...
> 


It won't work. Unknown options are detected before user parser is
called; user parser never sees them. So either you reimplement argument
processing or you have to bite the bullet and accept that behavior is
now conforms to standard one ... 

Or you can raise this issue on gnulib list, whether they can consider
implementing this (passing unknown options through to user parser).



reply via email to

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