summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeoff Levand <geoff@infradead.org>2018-04-11 17:03:11 +0000
committerSimon Horman <horms@verge.net.au>2018-04-19 10:37:05 +0200
commit798317c134b2acb3b501b336d055cd0f5566a239 (patch)
tree0fa144525f06a49baedf5256a5d1ef9fc246ac96
parentb43960c20dd2b1f692db7f296f823bfd91d4f1df (diff)
downloadkexec-tools-798317c134b2acb3b501b336d055cd0f5566a239.tar.gz
kexec: Fix printf warning
Fixes warnings like these when building kexec for powerpc (32 bit): kexec.c: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘uint64_t Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r--kexec/kexec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kexec/kexec.c b/kexec/kexec.c
index 313d9fe3..29fa5faa 100644
--- a/kexec/kexec.c
+++ b/kexec/kexec.c
@@ -20,6 +20,7 @@
*/
#define _GNU_SOURCE
+#include <inttypes.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
@@ -1235,7 +1236,7 @@ static void print_crashkernel_region_size(void)
return;
}
- printf("%lu\n", (start != end) ? (end - start + 1) : 0UL);
+ printf("%" PRIu64 "\n", (start != end) ? (end - start + 1) : 0UL);
}
int main(int argc, char *argv[])