Skip to content

Commit 36091fd

Browse files
Mike Frysingersravnborg
authored andcommitted
kbuild: fixup genksyms usage/getopt
The usage does not mention the "-a,--arch" or "-T,--dump-types" options, so add them. The calls to getopt() seem to mention options that no longer exist (some "k" and "p" thingy) but omits the "h" option which means using '-h' actually triggers the error code path, so update those as well. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
1 parent c6025f4 commit 36091fd

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

‎scripts/genksyms/genksyms.c‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -440,17 +440,21 @@ void error_with_pos(const char *fmt, ...)
440440

441441
static void genksyms_usage(void)
442442
{
443-
fputs("Usage:\n" "genksyms [-dDwqhV] > /path/to/.tmp_obj.ver\n" "\n"
443+
fputs("Usage:\n" "genksyms [-adDTwqhV] > /path/to/.tmp_obj.ver\n" "\n"
444444
#ifdef __GNU_LIBRARY__
445+
" -a, --arch Select architecture\n"
445446
" -d, --debug Increment the debug level (repeatable)\n"
446447
" -D, --dump Dump expanded symbol defs (for debugging only)\n"
448+
" -T, --dump-types file Dump expanded types into file (for debugging only)\n"
447449
" -w, --warnings Enable warnings\n"
448450
" -q, --quiet Disable warnings (default)\n"
449451
" -h, --help Print this message\n"
450452
" -V, --version Print the release version\n"
451453
#else /* __GNU_LIBRARY__ */
454+
" -a Select architecture\n"
452455
" -d Increment the debug level (repeatable)\n"
453456
" -D Dump expanded symbol defs (for debugging only)\n"
457+
" -T file Dump expanded types into file (for debugging only)\n"
454458
" -w Enable warnings\n"
455459
" -q Disable warnings (default)\n"
456460
" -h Print this message\n"
@@ -477,10 +481,10 @@ int main(int argc, char **argv)
477481
{0, 0, 0, 0}
478482
};
479483

480-
while ((o = getopt_long(argc, argv, "a:dwqVDT:k:p:",
484+
while ((o = getopt_long(argc, argv, "a:dwqVDT:h",
481485
&long_opts[0], NULL)) != EOF)
482486
#else /* __GNU_LIBRARY__ */
483-
while ((o = getopt(argc, argv, "a:dwqVDT:k:p:")) != EOF)
487+
while ((o = getopt(argc, argv, "a:dwqVDT:h")) != EOF)
484488
#endif /* __GNU_LIBRARY__ */
485489
switch (o) {
486490
case 'a':

0 commit comments

Comments
 (0)