summaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
authorRob Landley2006-05-28 01:56:08 +0000
committerRob Landley2006-05-28 01:56:08 +0000
commit81dab2cf834cb5369bd70feaf4ff45363dba12dd (patch)
treee89f8ea7219f26fd8b9b4feb1102cbf567099349 /miscutils
parent0fbe7ddbdda3917dd23004b7f88f772a63300f0c (diff)
downloadbusybox-81dab2cf834cb5369bd70feaf4ff45363dba12dd.zip
busybox-81dab2cf834cb5369bd70feaf4ff45363dba12dd.tar.gz
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.
Diffstat (limited to 'miscutils')
-rw-r--r--miscutils/hdparm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c
index 7511f35..ea73701 100644
--- a/miscutils/hdparm.c
+++ b/miscutils/hdparm.c
@@ -825,17 +825,17 @@ static void identify(uint16_t *id_supplied)
(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");
}