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"? FWIW, I have always seen "--raid" in user's documentation (wiki, manpages, text docs...), but the "--raid-mode" term has been present for a long time (e.g. v.3.86 in a different source code file, probably prior versions too). TIA, Ady.
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.
> 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.
Maybe Matching Threads
- raid long option
- syslinux-4.02-6-ge841d69 build failure
- [PATCH 8/8] libinstaller/syslxopt.c: update the help text.
- [PATCH] extlinux: Add the --menu-save option to set the MENU SAVE value from the running system using extlinux
- [PATCH 0/8] extlinux: support unmounted ext2/3/4 filesystem