[Kexecboot-devel] [PATCH 4/4] devicescan: correct partitions size priting

Dmitry Eremin-Solenikov dbaryshkov at gmail.com
Fri Aug 19 13:22:36 CEST 2011


Partition size is stored in unsigned long long. Kexecboot uses %d, which
assumes plain int. So, in some circumstances the partition size will be
printed incorrectly. Fix that by using %llu format specification.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov at gmail.com>
---
 devicescan.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/devicescan.c b/devicescan.c
index 6f4c976..cfc43bc 100644
--- a/devicescan.c
+++ b/devicescan.c
@@ -362,7 +362,7 @@ int devscan_next(FILE *fp, struct charlist *fslist, struct device_t *dev)
 	strcpy(device, "/dev/");
 	strncat(device, tmp, len);
 
-	log_msg(lg, "Found device '%s' (%d, %d) of size %dMb",
+	log_msg(lg, "Found device '%s' (%d, %d) of size %lluMb",
 			device, major, minor, blocks>>10);
 
 #ifdef USE_DEVICES_RECREATING
-- 
1.7.2.5




More information about the Kexecboot-devel mailing list