aboutsummaryrefslogtreecommitdiff
path: root/coreutils/stat.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-11-13 21:53:32 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-11-13 21:53:32 +0000
commit86c285d9003b3b8196707130d48d5c698b6cd3d3 (patch)
tree4a016cc9bd00d145af260061ca2443614f0e020a /coreutils/stat.c
parent3470f9297ef179dd327031351a2ac1feccce32f6 (diff)
downloadbusybox-w32-86c285d9003b3b8196707130d48d5c698b6cd3d3.tar.gz
busybox-w32-86c285d9003b3b8196707130d48d5c698b6cd3d3.tar.bz2
busybox-w32-86c285d9003b3b8196707130d48d5c698b6cd3d3.zip
stat: fix compile breakage (get_f_fsid() is used even if !FEATURE_STAT_FORMAT)
Diffstat (limited to 'coreutils/stat.c')
-rw-r--r--coreutils/stat.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/coreutils/stat.c b/coreutils/stat.c
index 4c729e071..32e8b42f3 100644
--- a/coreutils/stat.c
+++ b/coreutils/stat.c
@@ -125,20 +125,6 @@ static const char *human_fstype(uint32_t f_type)
125 return humantypes[i].fs; 125 return humantypes[i].fs;
126} 126}
127 127
128#if ENABLE_FEATURE_STAT_FORMAT
129static void strcatc(char *str, char c)
130{
131 int len = strlen(str);
132 str[len++] = c;
133 str[len] = '\0';
134}
135
136static void printfs(char *pformat, const char *msg)
137{
138 strcatc(pformat, 's');
139 printf(pformat, msg);
140}
141
142/* "man statfs" says that statfsbuf->f_fsid is a mess */ 128/* "man statfs" says that statfsbuf->f_fsid is a mess */
143/* coreutils treats it as an array of ints, most significant first */ 129/* coreutils treats it as an array of ints, most significant first */
144static unsigned long long get_f_fsid(const struct statfs *statfsbuf) 130static 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)
153 return r; 139 return r;
154} 140}
155 141
142#if ENABLE_FEATURE_STAT_FORMAT
143static void strcatc(char *str, char c)
144{
145 int len = strlen(str);
146 str[len++] = c;
147 str[len] = '\0';
148}
149
150static void printfs(char *pformat, const char *msg)
151{
152 strcatc(pformat, 's');
153 printf(pformat, msg);
154}
155
156/* print statfs info */ 156/* print statfs info */
157static void print_statfs(char *pformat, const char m, 157static void print_statfs(char *pformat, const char m,
158 const char *const filename, const void *data 158 const char *const filename, const void *data