summaryrefslogtreecommitdiffstats
path: root/discover/device-handler.c
diff options
context:
space:
mode:
authorGeoff Levand <geoff@infradead.org>2018-01-06 00:47:39 +0000
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>2018-01-10 13:34:54 +1100
commit41caf09e98b14e34830f524405efc1bdd4087365 (patch)
tree51c4ff3af3a20d41277b5b2318d141713cfbaa46 /discover/device-handler.c
parentc462aa6f8e4658ed23df16bc9e1822e384744e53 (diff)
downloadtalos-petitboot-41caf09e98b14e34830f524405efc1bdd4087365.zip
talos-petitboot-41caf09e98b14e34830f524405efc1bdd4087365.tar.gz
printf: Fix format type warnings
Fixes build warnings like these when building 32 bit programs: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument has type ‘uint64_t’ Signed-off-by: Geoff Levand <geoff@infradead.org> Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'discover/device-handler.c')
-rw-r--r--discover/device-handler.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/discover/device-handler.c b/discover/device-handler.c
index 8223015..7a570f9 100644
--- a/discover/device-handler.c
+++ b/discover/device-handler.c
@@ -1,4 +1,5 @@
#include <assert.h>
+#include <inttypes.h>
#include <stdlib.h>
#include <stdbool.h>
#include <unistd.h>
@@ -653,7 +654,7 @@ void device_handler_status_download(struct device_handler *handler,
unit++;
}
update = talloc_asprintf(handler,
- _("%u %s downloading: %.0f%% - %lu%cB"),
+ _("%u %s downloading: %.0f%% - %" PRIu64 "%cB"),
handler->n_progress,
ngettext("item", "items", handler->n_progress),
(current / total) * 100, current_converted,
OpenPOWER on IntegriCloud