Skip to contentSkip to conversation

migration: Fix debug print type

PATCH In review Christoffer Dall 3 participants 3 messages Aug 23, 2013 – Sep 24, 2013

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 migration: Fix debug print type

The printf args are uint64_t and with -Werr QEMU doesn't compile with migration debugging turned on unless this is fixed. Fix it.

---

[Changelog v1 -> v2]:
- Use PRIu64 instead of %llu

 migration.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
migration.c +2 -1
index 1402fa7..e9b83f6 100644
@@ -566,7 +566,8 @@ static void *migration_thread(void *opaque)
         if (!qemu_file_rate_limit(s->file)) {
             DPRINTF("iterate\n");
             pending_size = qemu_savevm_state_pending(s->file, max_size);
-            DPRINTF("pending size %lu max %lu\n", pending_size, max_size);
+            DPRINTF("pending size %" PRIu64 " max %" PRIu64 "\n",
+                    pending_size, max_size);
             if (pending_size && pending_size >= max_size) {
                 qemu_savevm_state_iterate(s->file);
             } else {
Signature · 1 line
1.7.10.4
Reviewed-by on v2 1/1
#1 lore raw

Am 23.08.2013 19:34, schrieb Christoffer Dall:

Quoted 17 lines

The printf args are uint64_t and with -Werr QEMU doesn't compile with migration debugging turned on unless this is fixed. Fix it.

---

[Changelog v1 -> v2]:
- Use PRIu64 instead of %llu

 migration.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
migration.c +0 -0
index 1402fa7..e9b83f6 100644

migration.c static void *migration_thread(void *opaque) · line 573

Quoted 9 lines
migration.c +2 -1
@@ -566,7 +566,8 @@ static void *migration_thread(void *opaque)
         if (!qemu_file_rate_limit(s->file)) {
             DPRINTF("iterate\n");
             pending_size = qemu_savevm_state_pending(s->file, max_size);
-            DPRINTF("pending size %lu max %lu\n", pending_size, max_size);
+            DPRINTF("pending size %" PRIu64 " max %" PRIu64 "\n",
+                    pending_size, max_size);
             if (pending_size && pending_size >= max_size) {
                 qemu_savevm_state_iterate(s->file);
             } else {

max_size is not uint64_t but int64_t, so PRId64 would be even better for that argument, but I don't think this is worth an additional iteration.

CC'ing qemu-trivial, the patch can be applied there.

Regards,
Stefan