Change requested in launchpad bug #1288352
[packages/centos6/qemu.git] / 0185-arch_init.c-add-missing-symbols-before-PRIu64-in-deb.patch
1 From df075bd97f2d88969e3178ec9cb302f955d31737 Mon Sep 17 00:00:00 2001
2 From: Igor Mitsyanko <i.mitsyanko@samsung.com>
3 Date: Wed, 5 Sep 2012 13:04:56 +0400
4 Subject: [PATCH] arch_init.c: add missing '%' symbols before PRIu64 in debug
5  printfs
6
7 '%' symbols were missing in front of PRIu64 macros in DPRINTF() messages in
8 arch_init.c, this caused compilation warnings when compiled with DEBUG_ARCH_INIT defined.
9
10 Signed-off-by: Igor Mitsyanko <i.mitsyanko@samsung.com>
11 Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
12 (cherry picked from commit ef37a699a06f96e098ee00683b7052b5fbb6ad7d)
13
14 Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
15 ---
16  arch_init.c | 8 ++++----
17  1 file changed, 4 insertions(+), 4 deletions(-)
18
19 diff --git a/arch_init.c b/arch_init.c
20 index 5a1173e..47977de 100644
21 --- a/arch_init.c
22 +++ b/arch_init.c
23 @@ -562,7 +562,7 @@ static int ram_save_iterate(QEMUFile *f, void *opaque)
24          if ((i & 63) == 0) {
25              uint64_t t1 = (qemu_get_clock_ns(rt_clock) - bwidth) / 1000000;
26              if (t1 > MAX_WAIT) {
27 -                DPRINTF("big wait: " PRIu64 " milliseconds, %d iterations\n",
28 +                DPRINTF("big wait: %" PRIu64 " milliseconds, %d iterations\n",
29                          t1, i);
30                  break;
31              }
32 @@ -587,7 +587,7 @@ static int ram_save_iterate(QEMUFile *f, void *opaque)
33  
34      expected_time = ram_save_remaining() * TARGET_PAGE_SIZE / bwidth;
35  
36 -    DPRINTF("ram_save_live: expected(" PRIu64 ") <= max(" PRIu64 ")?\n",
37 +    DPRINTF("ram_save_live: expected(%" PRIu64 ") <= max(%" PRIu64 ")?\n",
38              expected_time, migrate_max_downtime());
39  
40      if (expected_time <= migrate_max_downtime()) {
41 @@ -799,8 +799,8 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id)
42      } while (!(flags & RAM_SAVE_FLAG_EOS));
43  
44  done:
45 -    DPRINTF("Completed load of VM with exit code %d seq iteration " PRIu64 "\n",
46 -            ret, seq_iter);
47 +    DPRINTF("Completed load of VM with exit code %d seq iteration "
48 +            "%" PRIu64 "\n", ret, seq_iter);
49      return ret;
50  }
51  
52 -- 
53 1.7.12.1
54