diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2017-12-31 17:30:02 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-12-31 17:30:02 +0100 |
commit | 82d1c1f84ae23793d81b50aa0a753ad7c4db4f51 (patch) | |
tree | e5c1dc00b04299cf627cf2ef18453aea96c5f1e5 /coreutils | |
parent | 36acc4631c94bb0f43ecaac5d61dc773ef773e91 (diff) |
randomconfig fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils')
-rw-r--r-- | coreutils/cat.c | 5 | ||||
-rw-r--r-- | coreutils/ls.c | 5 | ||||
-rw-r--r-- | coreutils/stat.c | 7 | ||||
-rw-r--r-- | coreutils/uname.c | 6 |
4 files changed, 13 insertions, 10 deletions
diff --git a/coreutils/cat.c b/coreutils/cat.c index 7e35fa5ee..5f02233ca 100644 --- a/coreutils/cat.c +++ b/coreutils/cat.c @@ -168,9 +168,12 @@ static int catv(unsigned opts, char **argv) int cat_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; int cat_main(int argc UNUSED_PARAM, char **argv) { +#if ENABLE_FEATURE_CATV || ENABLE_FEATURE_CATN unsigned opts; - opts = getopt32(argv, IF_FEATURE_CATV("^") + opts = +#endif + getopt32(argv, IF_FEATURE_CATV("^") /* -u is ignored ("unbuffered") */ IF_FEATURE_CATV("etvA")IF_FEATURE_CATN("nb")"u" IF_FEATURE_CATV("\0" "Aetv" /* -A == -vet */) diff --git a/coreutils/ls.c b/coreutils/ls.c index a4e324b00..4be499088 100644 --- a/coreutils/ls.c +++ b/coreutils/ls.c @@ -482,12 +482,11 @@ static NOINLINE unsigned display_single(const struct dnode *dn) int opt; #if ENABLE_FEATURE_LS_FILETYPES || ENABLE_FEATURE_LS_COLOR struct stat statbuf; - char append; #endif - #if ENABLE_FEATURE_LS_FILETYPES - append = append_char(dn->dn_mode); + char append = append_char(dn->dn_mode); #endif + opt = option_mask32; /* Do readlink early, so that if it fails, error message diff --git a/coreutils/stat.c b/coreutils/stat.c index dafbd4e9f..7ba3db155 100644 --- a/coreutils/stat.c +++ b/coreutils/stat.c @@ -759,10 +759,13 @@ int stat_main(int argc UNUSED_PARAM, char **argv) IF_FEATURE_STAT_FORMAT(char *format = NULL;) int i; int ok; - unsigned opts; statfunc_ptr statfunc = do_stat; +#if ENABLE_FEATURE_STAT_FILESYSTEM || ENABLE_SELINUX + unsigned opts; - opts = getopt32(argv, "^" + opts = +#endif + getopt32(argv, "^" "tL" IF_FEATURE_STAT_FILESYSTEM("f") IF_SELINUX("Z") diff --git a/coreutils/uname.c b/coreutils/uname.c index 57039b1bf..765809658 100644 --- a/coreutils/uname.c +++ b/coreutils/uname.c @@ -127,11 +127,9 @@ int uname_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) { uname_info_t uname_info; IF_UNAME(const char *unknown_str = "unknown";) - unsigned toprint; - - toprint = (1 << 4); /* "arch" = "uname -m" */ - #if ENABLE_UNAME + unsigned toprint = (1 << 4); /* "arch" = "uname -m" */ + if (!ENABLE_BB_ARCH || applet_name[0] == 'u') { # if ENABLE_LONG_OPTS static const char uname_longopts[] ALIGN1 = |