svn commit: trunk/busybox/coreutils

vda at busybox.net vda at busybox.net
Thu Nov 13 21:53:32 UTC 2008


Author: vda
Date: 2008-11-13 13:53:32 -0800 (Thu, 13 Nov 2008)
New Revision: 24032

Log:
stat: fix compile breakage (get_f_fsid() is used even if !FEATURE_STAT_FORMAT)



Modified:
   trunk/busybox/coreutils/stat.c


Changeset:
Modified: trunk/busybox/coreutils/stat.c
===================================================================
--- trunk/busybox/coreutils/stat.c	2008-11-13 16:32:56 UTC (rev 24031)
+++ trunk/busybox/coreutils/stat.c	2008-11-13 21:53:32 UTC (rev 24032)
@@ -125,6 +125,20 @@
 	return humantypes[i].fs;
 }
 
+/* "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)
+{
+	const unsigned *p = (const void*) &statfsbuf->f_fsid;
+	unsigned sz = sizeof(statfsbuf->f_fsid) / sizeof(unsigned);
+	unsigned long long r = 0;
+
+	do
+		r = (r << (sizeof(unsigned)*8)) | *p++;
+	while (--sz > 0);
+	return r;
+}
+
 #if ENABLE_FEATURE_STAT_FORMAT
 static void strcatc(char *str, char c)
 {
@@ -139,20 +153,6 @@
 	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)
-{
-	const unsigned *p = (const void*) &statfsbuf->f_fsid;
-	unsigned sz = sizeof(statfsbuf->f_fsid) / sizeof(unsigned);
-	unsigned long long r = 0;
-
-	do
-		r = (r << (sizeof(unsigned)*8)) | *p++;
-	while (--sz > 0);
-	return r;
-}
-
 /* print statfs info */
 static void print_statfs(char *pformat, const char m,
 		const char *const filename, const void *data




More information about the busybox-cvs mailing list