diff options
author | Denis Vlasenko | 2008-11-13 21:53:32 +0000 |
---|---|---|
committer | Denis Vlasenko | 2008-11-13 21:53:32 +0000 |
commit | 86c285d9003b3b8196707130d48d5c698b6cd3d3 (patch) | |
tree | 4a016cc9bd00d145af260061ca2443614f0e020a | |
parent | 3470f9297ef179dd327031351a2ac1feccce32f6 (diff) | |
download | busybox-86c285d9003b3b8196707130d48d5c698b6cd3d3.zip busybox-86c285d9003b3b8196707130d48d5c698b6cd3d3.tar.gz |
stat: fix compile breakage (get_f_fsid() is used even if !FEATURE_STAT_FORMAT)
-rw-r--r-- | coreutils/stat.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/coreutils/stat.c b/coreutils/stat.c index 4c729e0..32e8b42 100644 --- a/coreutils/stat.c +++ b/coreutils/stat.c @@ -125,20 +125,6 @@ static const char *human_fstype(uint32_t f_type) return humantypes[i].fs; } -#if ENABLE_FEATURE_STAT_FORMAT -static void strcatc(char *str, char c) -{ - int len = strlen(str); - str[len++] = c; - str[len] = '\0'; -} - -static void printfs(char *pformat, const char *msg) -{ - strcatc(pformat, 's'); - printf(pformat, msg); -} - /* "man statfs" says that statfsbuf->f_fsid is a mess */ /* coreutils treats it as an array of ints, most significant first */ static unsigned long long get_f_fsid(const struct statfs *statfsbuf) @@ -153,6 +139,20 @@ static unsigned long long get_f_fsid(const struct statfs *statfsbuf) return r; } +#if ENABLE_FEATURE_STAT_FORMAT +static void strcatc(char *str, char c) +{ + int len = strlen(str); + str[len++] = c; + str[len] = '\0'; +} + +static void printfs(char *pformat, const char *msg) +{ + strcatc(pformat, 's'); + printf(pformat, msg); +} + /* print statfs info */ static void print_statfs(char *pformat, const char m, const char *const filename, const void *data |