From 240a1cfbbe6cf42e8013ce06cb567b3f28c8727f Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Sun, 8 Apr 2007 16:07:02 +0000 Subject: add some missed statics on constant objects. fix few #ifndef ENABLE_xxx # size busybox_old busybox_unstripped text data bss dec hex filename 677152 2920 18208 698280 aa7a8 busybox_old 676420 2920 18208 697548 aa4cc busybox_unstripped --- coreutils/stat.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'coreutils/stat.c') diff --git a/coreutils/stat.c b/coreutils/stat.c index 397e395d8..7c5631764 100644 --- a/coreutils/stat.c +++ b/coreutils/stat.c @@ -68,7 +68,7 @@ static char const *human_time(time_t t) static char const *human_fstype(long f_type) { int i; - const struct types { + static const struct types { long type; const char * const fs; } humantypes[] = { @@ -109,13 +109,13 @@ static char const *human_fstype(long f_type) { 0x62656572, "sysfs" }, { 0, "UNKNOWN" } }; - for (i=0; humantypes[i].type; ++i) + for (i = 0; humantypes[i].type; ++i) if (humantypes[i].type == f_type) break; return humantypes[i].fs; } -#ifdef CONFIG_FEATURE_STAT_FORMAT +#if ENABLE_FEATURE_STAT_FORMAT /* print statfs info */ static void print_statfs(char *pformat, const size_t buf_len, const char m, const char * const filename, void const *data @@ -354,9 +354,9 @@ static bool do_statfs(char const *filename, char const *format) return 0; } -#ifdef CONFIG_FEATURE_STAT_FORMAT +#if ENABLE_FEATURE_STAT_FORMAT if (format == NULL) -#ifndef ENABLE_SELINUX +#if !ENABLE_SELINUX format = (option_mask32 & OPT_TERSE ? "%n %i %l %t %s %b %f %a %c %d\n" : " File: \"%n\"\n" @@ -460,9 +460,9 @@ static bool do_stat(char const *filename, char const *format) return 0; } -#ifdef CONFIG_FEATURE_STAT_FORMAT +#if ENABLE_FEATURE_STAT_FORMAT if (format == NULL) { -#ifndef ENABLE_SELINUX +#if !ENABLE_SELINUX if (option_mask32 & OPT_TERSE) { format = "%n %s %b %f %u %g %D %i %h %t %T %X %Y %Z %o"; } else { -- cgit v1.2.3