From f5fb43c94f2cef988b5de1d96ec20200876b7dc5 Mon Sep 17 00:00:00 2001 From: Murai Takashi Date: Thu, 6 Jun 2019 20:53:13 +0900 Subject: [PATCH] bin/vmstat: Fix -Wformat= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Id0a03d868143880d50c685d830b23017293f3e38 Reviewed-on: https://review.haiku-os.org/c/1518 Reviewed-by: Jérôme Duval Reviewed-by: waddlesplash --- src/bin/vmstat.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/bin/vmstat.cpp b/src/bin/vmstat.cpp index 9d6085b32f..314b4cc385 100644 --- a/src/bin/vmstat.cpp +++ b/src/bin/vmstat.cpp @@ -74,13 +74,16 @@ main(int argc, char** argv) return 1; } - printf("max memory:\t\t%Lu\n", info.max_pages * B_PAGE_SIZE); - printf("free memory:\t\t%Lu\n", info.free_memory); - printf("needed memory:\t\t%Lu\n", info.needed_memory); - printf("block cache memory:\t%Lu\n", info.block_cache_pages * B_PAGE_SIZE); - printf("max swap space:\t\t%Lu\n", info.max_swap_pages * B_PAGE_SIZE); - printf("free swap space:\t%Lu\n", info.free_swap_pages * B_PAGE_SIZE); - printf("page faults:\t\t%lu\n", info.page_faults); + printf("max memory:\t\t%" B_PRIu64 "\n", info.max_pages * B_PAGE_SIZE); + printf("free memory:\t\t%" B_PRIu64 "\n", info.free_memory); + printf("needed memory:\t\t%" B_PRIu64 "\n", info.needed_memory); + printf("block cache memory:\t%" B_PRIu64 "\n", + info.block_cache_pages * B_PAGE_SIZE); + printf("max swap space:\t\t%" B_PRIu64 "\n", + info.max_swap_pages * B_PAGE_SIZE); + printf("free swap space:\t%" B_PRIu64 "\n", + info.free_swap_pages * B_PAGE_SIZE); + printf("page faults:\t\t%" B_PRIu32 "\n", info.page_faults); if (periodically) { puts("\npage faults used memory used swap block cache");