diff options
-rw-r--r-- | coreutils/uname.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/coreutils/uname.c b/coreutils/uname.c index cd0218aaf..4c3bf2f3b 100644 --- a/coreutils/uname.c +++ b/coreutils/uname.c | |||
@@ -73,6 +73,21 @@ static const unsigned short utsname_offset[] = { | |||
73 | int uname_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 73 | int uname_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
74 | int uname_main(int argc UNUSED_PARAM, char **argv) | 74 | int uname_main(int argc UNUSED_PARAM, char **argv) |
75 | { | 75 | { |
76 | #if ENABLE_FEATURE_UNEXPAND_LONG_OPTIONS | ||
77 | static const char longopts[] ALIGN1 = | ||
78 | /* name, has_arg, val */ | ||
79 | "all\0" No_argument "a" | ||
80 | "kernel-name\0" No_argument "s" | ||
81 | "nodename\0" No_argument "n" | ||
82 | "kernel-release\0" No_argument "r" | ||
83 | "release\0" No_argument "r" | ||
84 | "kernel-version\0" No_argument "v" | ||
85 | "machine\0" No_argument "m" | ||
86 | "processor\0" No_argument "p" | ||
87 | "hardware-platform\0" No_argument "i" | ||
88 | "operating-system\0" No_argument "o" | ||
89 | ; | ||
90 | #endif | ||
76 | uname_info_t uname_info; | 91 | uname_info_t uname_info; |
77 | #if defined(__sparc__) && defined(__linux__) | 92 | #if defined(__sparc__) && defined(__linux__) |
78 | char *fake_sparc = getenv("FAKE_SPARC"); | 93 | char *fake_sparc = getenv("FAKE_SPARC"); |
@@ -82,6 +97,7 @@ int uname_main(int argc UNUSED_PARAM, char **argv) | |||
82 | const unsigned short *delta; | 97 | const unsigned short *delta; |
83 | unsigned toprint; | 98 | unsigned toprint; |
84 | 99 | ||
100 | USE_FEATURE_UNEXPAND_LONG_OPTIONS(applet_long_options = longopts); | ||
85 | toprint = getopt32(argv, options); | 101 | toprint = getopt32(argv, options); |
86 | 102 | ||
87 | if (argv[optind]) { /* coreutils-6.9 compat */ | 103 | if (argv[optind]) { /* coreutils-6.9 compat */ |