----- Forwarded Message -----
From: "Alexey Dobriyan" <[email protected]>
To: "Dave Anderson" <[email protected]>
Sent: Thursday, January 22, 2015 5:56:11 AM
Subject: [PATCH] crash: use %lu for counters

These counters are "unsigned long" in kernel and positive in principle.
Seen during debugging OOM apocalypse event.
--- a/memory.c
+++ b/memory.c
@@ -15954,7 +15954,7 @@ dump_zone_stats(void)
 			if (VALID_MEMBER(zone_pages_scanned)) {
 				value1 = ULONG(zonebuf + 
 					OFFSET(zone_pages_scanned));
-				fprintf(fp, "PAGES_SCANNED: %ld  ", value1);
+				fprintf(fp, "PAGES_SCANNED: %lu  ", value1);
 			} 
 			fprintf(fp, "\n");
 
@@ -17150,7 +17150,7 @@ dump_vm_event_state(void)
 			maxlen = len; 
 
 	for (i = 0; i < vt->nr_vm_event_items; i++)
-		fprintf(fp, "%s%s: %ld\n", 
+		fprintf(fp, "%s%s: %lu\n", 
 			space(maxlen - strlen(vt->vm_event_items[i])),
 			vt->vm_event_items[i], cumulative[i]);
 
--
Crash-utility mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/crash-utility

Reply via email to