svn commit: trunk/busybox: coreutils e2fsprogs include miscutils

landley at busybox.net landley at busybox.net
Sun May 28 01:56:10 UTC 2006


Author: landley
Date: 2006-05-27 18:56:08 -0700 (Sat, 27 May 2006)
New Revision: 15208

Log:
Fix hdparm to use PRIu64 instead of typecasting to long long (which is 128 bits
on 64 bit platforms), and move #include <inttypes.h> to libbb.h.


Modified:
   trunk/busybox/coreutils/cksum.c
   trunk/busybox/e2fsprogs/e2fsck.h
   trunk/busybox/include/libbb.h
   trunk/busybox/miscutils/hdparm.c


Changeset:
Modified: trunk/busybox/coreutils/cksum.c
===================================================================
--- trunk/busybox/coreutils/cksum.c	2006-05-28 01:40:26 UTC (rev 15207)
+++ trunk/busybox/coreutils/cksum.c	2006-05-28 01:56:08 UTC (rev 15208)
@@ -9,7 +9,6 @@
 #include <stdio.h>
 #include <unistd.h>
 #include <fcntl.h>
-#include <inttypes.h>
 #include "busybox.h"
 
 int cksum_main(int argc, char **argv) {

Modified: trunk/busybox/e2fsprogs/e2fsck.h
===================================================================
--- trunk/busybox/e2fsprogs/e2fsck.h	2006-05-28 01:40:26 UTC (rev 15207)
+++ trunk/busybox/e2fsprogs/e2fsck.h	2006-05-28 01:56:08 UTC (rev 15208)
@@ -1,5 +1,4 @@
 #include <sys/types.h>
-#include <inttypes.h>
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>

Modified: trunk/busybox/include/libbb.h
===================================================================
--- trunk/busybox/include/libbb.h	2006-05-28 01:40:26 UTC (rev 15207)
+++ trunk/busybox/include/libbb.h	2006-05-28 01:56:08 UTC (rev 15208)
@@ -24,6 +24,7 @@
 #include <netinet/in.h>
 #include <netdb.h>
 
+#include <inttypes.h>
 #include <sys/time.h>
 
 #include "bb_config.h"

Modified: trunk/busybox/miscutils/hdparm.c
===================================================================
--- trunk/busybox/miscutils/hdparm.c	2006-05-28 01:40:26 UTC (rev 15207)
+++ trunk/busybox/miscutils/hdparm.c	2006-05-28 01:56:08 UTC (rev 15208)
@@ -825,17 +825,17 @@
 			        (uint64_t)val[LBA_48_MSB]	<< 32 |
 			        (uint64_t)val[LBA_MID]	<< 16 |
 					val[LBA_LSB] ;
-			printf("\tLBA48  user addressable sectors:%11llu\n",(long long unsigned int)bbbig);
+			printf("\tLBA48  user addressable sectors:%11"PRIu64"\n",bbbig);
 		}
 
 		if (!bbbig)
 			bbbig = (uint64_t)(ll>mm ? ll : mm); /* # 512 byte blocks */
-		printf("\tdevice size with M = 1024*1024: %11llu MBytes\n",(long long unsigned int)(bbbig>>11));
+		printf("\tdevice size with M = 1024*1024: %11"PRIu64" MBytes\n",bbbig>>11);
 		bbbig = (bbbig<<9)/1000000;
-		printf("\tdevice size with M = 1000*1000: %11llu MBytes ",(long long unsigned int)bbbig);
+		printf("\tdevice size with M = 1000*1000: %11"PRIu64" MBytes ",bbbig);
 
 		if (bbbig > 1000)
-			printf("(%llu GB)\n", (long long unsigned int)bbbig/1000);
+			printf("(%"PRIu64" GB)\n", bbbig/1000);
 		else 
 			printf("\n");
 	}




More information about the busybox-cvs mailing list