Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

genksyms: use getopt_long() unconditionally

getopt_long() is used by various tools in the kernel (e.g. Kconfig).

It should be fine to use it all the time.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

-18
-18
scripts/genksyms/genksyms.c
··· 16 16 #include <unistd.h> 17 17 #include <assert.h> 18 18 #include <stdarg.h> 19 - #ifdef __GNU_LIBRARY__ 20 19 #include <getopt.h> 21 - #endif /* __GNU_LIBRARY__ */ 22 20 23 21 #include "genksyms.h" 24 22 /*----------------------------------------------------------------------*/ ··· 716 718 static void genksyms_usage(void) 717 719 { 718 720 fputs("Usage:\n" "genksyms [-adDTwqhVR] > /path/to/.tmp_obj.ver\n" "\n" 719 - #ifdef __GNU_LIBRARY__ 720 721 " -d, --debug Increment the debug level (repeatable)\n" 721 722 " -D, --dump Dump expanded symbol defs (for debugging only)\n" 722 723 " -r, --reference file Read reference symbols from a file\n" ··· 725 728 " -q, --quiet Disable warnings (default)\n" 726 729 " -h, --help Print this message\n" 727 730 " -V, --version Print the release version\n" 728 - #else /* __GNU_LIBRARY__ */ 729 - " -d Increment the debug level (repeatable)\n" 730 - " -D Dump expanded symbol defs (for debugging only)\n" 731 - " -r file Read reference symbols from a file\n" 732 - " -T file Dump expanded types into file\n" 733 - " -p Preserve reference modversions or fail\n" 734 - " -w Enable warnings\n" 735 - " -q Disable warnings (default)\n" 736 - " -h Print this message\n" 737 - " -V Print the release version\n" 738 - #endif /* __GNU_LIBRARY__ */ 739 731 , stderr); 740 732 } 741 733 ··· 733 747 FILE *dumpfile = NULL, *ref_file = NULL; 734 748 int o; 735 749 736 - #ifdef __GNU_LIBRARY__ 737 750 struct option long_opts[] = { 738 751 {"debug", 0, 0, 'd'}, 739 752 {"warnings", 0, 0, 'w'}, ··· 748 763 749 764 while ((o = getopt_long(argc, argv, "dwqVDr:T:ph", 750 765 &long_opts[0], NULL)) != EOF) 751 - #else /* __GNU_LIBRARY__ */ 752 - while ((o = getopt(argc, argv, "dwqVDr:T:ph")) != EOF) 753 - #endif /* __GNU_LIBRARY__ */ 754 766 switch (o) { 755 767 case 'd': 756 768 flag_debug++;