[BusyBox-cvs] svn commit: trunk/busybox/coreutils

vapier at busybox.net vapier at busybox.net
Tue Jul 26 22:39:57 UTC 2005


Author: vapier
Date: 2005-07-26 16:39:56 -0600 (Tue, 26 Jul 2005)
New Revision: 10917

Log:
just punt all the f_frsize crap since not all linux headers support it Bug 346

Modified:
   trunk/busybox/coreutils/stat.c


Changeset:
Modified: trunk/busybox/coreutils/stat.c
===================================================================
--- trunk/busybox/coreutils/stat.c	2005-07-26 22:26:49 UTC (rev 10916)
+++ trunk/busybox/coreutils/stat.c	2005-07-26 22:39:56 UTC (rev 10917)
@@ -37,10 +37,6 @@
 #include <string.h>
 #include "busybox.h"
 
-#ifdef __linux__
-# include <linux/version.h>
-#endif
-
 /* vars to control behavior */
 #define OPT_TERSE 2
 #define OPT_DEREFERNCE 4
@@ -173,23 +169,11 @@
 		strncat(pformat, "ld", buf_len);
 		printf(pformat, (intmax_t) (statfsbuf->f_bavail));
 		break;
+	case 'S':
 	case 's':
 		strncat(pformat, "lu", buf_len);
 		printf(pformat, (unsigned long int) (statfsbuf->f_bsize));
 		break;
-	case 'S': {
-		unsigned long int frsize;
-#if defined(__linux__) && LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
-		frsize = statfsbuf->f_frsize;
-		if (!frsize)
-			frsize = statfsbuf->f_bsize;
-#else
-		frsize = statfsbuf->f_bsize;
-#endif
-		strncat(pformat, "lu", buf_len);
-		printf(pformat, frsize);
-		break;
-	}
 	case 'c':
 		strncat(pformat, "ld", buf_len);
 		printf(pformat, (intmax_t) (statfsbuf->f_files));
@@ -407,10 +391,10 @@
 #ifdef CONFIG_FEATURE_STAT_FORMAT
 	if (format == NULL)
 		format = (flags & OPT_TERSE
-			? "%n %i %l %t %s %S %b %f %a %c %d\n"
+			? "%n %i %l %t %s %b %f %a %c %d\n"
 			: "  File: \"%n\"\n"
 			  "    ID: %-8i Namelen: %-7l Type: %T\n"
-			  "Block size: %-10s Fundamental block size: %S\n"
+			  "Block size: %-10s\n"
 			  "Blocks: Total: %-10b Free: %-10f Available: %a\n"
 			  "Inodes: Total: %-10c Free: %d\n");
 	print_it(format, filename, print_statfs, &statfsbuf);
@@ -431,13 +415,12 @@
 		printf("Type: %s\n", human_fstype(statfsbuf.f_type));
 
 	format = (flags & OPT_TERSE
-		? "%lu %lu %ld %ld %ld %ld %ld\n"
-		: "Block size: %-10lu Fundamental block size: %lu\n"
+		? "%lu %ld %ld %ld %ld %ld\n"
+		: "Block size: %-10lu\n"
 		  "Blocks: Total: %-10ld Free: %-10ld Available: %ld\n"
 		  "Inodes: Total: %-10ld Free: %ld\n");
 	printf(format,
 	       (unsigned long int) (statfsbuf.f_bsize),
-	       statfsbuf.f_frsize ? statfsbuf.f_frsize : statfsbuf.f_bsize,
 	       (intmax_t) (statfsbuf.f_blocks),
 	       (intmax_t) (statfsbuf.f_bfree),
 	       (intmax_t) (statfsbuf.f_bavail),




More information about the busybox-cvs mailing list