changeset 689:c29e69a0e85e

On 32 bit platforms %ld doesn't match uint64_t, so do long long and %lld (rather than deal with verbose PRIu64 nonsense).
author Rob Landley <rob@landley.net>
date Sat, 10 Nov 2012 18:24:14 -0600
parents 9791e462855a
children a81cf364764d
files toys/posix/df.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/toys/posix/df.c	Sat Nov 10 14:34:01 2012 -0600
+++ b/toys/posix/df.c	Sat Nov 10 18:24:14 2012 -0600
@@ -49,7 +49,7 @@
 static void show_mt(struct mtab_list *mt)
 {
 	int len;
-	uint64_t size, used, avail, percent, block;
+	long long size, used, avail, percent, block;
 	char *device;
 
 	// Return if it wasn't found (should never happen, but with /etc/mtab...)
@@ -88,10 +88,10 @@
 	len = 25 - strlen(device);
 	if (len < 1) len = 1;
 	if (CFG_DF_PEDANTIC && (toys.optflags & FLAG_P)) {
-		xprintf("%s %ld %ld %ld %ld%% %s\n", device, size, used, avail,
+		xprintf("%s %lld %lld %lld %lld%% %s\n", device, size, used, avail,
 				percent, mt->dir);
 	} else {
-		xprintf("%s% *ld % 10ld % 9ld % 3ld%% %s\n", device, len,
+		xprintf("%s% *lld % 10lld % 9lld % 3lld%% %s\n", device, len,
 			size, used, avail, percent, mt->dir);
 	}