[syslinux] raid long option
Ady
ady-sf at hotmail.com
Sun Dec 28 03:08:06 PST 2014
> Ady <ady-sf at hotmail.com> writes:
>
> > In Syslinux 6.03 -> libinstaller/syslxopt.c:
> >
> >
> > #n 50: const struct option long_options[] = {
> > ...
> > #n 60: {"raid-mode", 0, NULL, 'r'},
> > ...
> > #n105: fprintf(stderr,
> > ...
> > #n112: " --raid -r Fall back to the next device on boot failure\n"
> >
> >
> > Comparing line #60 vs. line #112:
> > http://git.kernel.org/cgit/boot/syslinux/syslinux.git/tree/libinstaller/syslxopt.c?id=syslinux-6.03#n60
> > http://git.kernel.org/cgit/boot/syslinux/syslinux.git/tree/libinstaller/syslxopt.c?id=syslinux-6.03#n112
> >
> > Which one is the correct "long" option for users to type in?
> > Is it "--raid-mode", or "--raid"?
>
> --raid-mode is the full long option name, but the GNU getopt_long
> implementation accepts unique abbreviations for long options, so
> --ra, --rai, --raid, --raid- etc. are all valid usages.
> I think the -mode part is just unnecessary verbosity and could be
> dropped without affecting users, as it is never mentioned outside
> the code base.
> --
> Regards,
> Feri.
> _______________________________________________
> Syslinux mailing list
> Submissions to Syslinux at zytor.com
> Unsubscribe or set options at:
> http://www.zytor.com/mailman/listinfo/syslinux
>
Thank you for your explanation.
At least now I know that both terms should work (and anything in
between), since currently there is no other long option starting with
"--raid".
Considering that the term "--raid-mode" has survived so many years,
even before the existence of the "libinstaller/syslxopt.c" file (the
term used to be used in other file(s), before the unification of the
options in syslxopt.c), then perhaps Peter (hpa) has had some reason to
keep it that way; or at least some reason to have used such term in the
beginning (while documenting it in the same file(s) differently).
In any case, I cannot avoid being curious about the reason :).
Thank you,
Ady.
More information about the Syslinux
mailing list