|
|
9ae3a8 |
From 4796cbee4433654a54303102b9cc88f9c352b1b5 Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: Markus Armbruster <armbru@redhat.com>
|
|
|
9ae3a8 |
Date: Wed, 22 Jan 2014 12:13:54 +0100
|
|
|
9ae3a8 |
Subject: [PATCH 3/4] qdev: Fix 32-bit compilation in print_size
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
RH-Author: Markus Armbruster <armbru@redhat.com>
|
|
|
9ae3a8 |
Message-id: <1390392835-21809-2-git-send-email-armbru@redhat.com>
|
|
|
9ae3a8 |
Patchwork-id: 56889
|
|
|
9ae3a8 |
O-Subject: [PATCH 7.0 qemu-kvm 1/2] qdev: Fix 32-bit compilation in print_size
|
|
|
9ae3a8 |
Bugzilla: 1034876
|
|
|
9ae3a8 |
RH-Acked-by: Marcel Apfelbaum <marcel.a@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Orit Wasserman <owasserm@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Dr. David Alan Gilbert (git) <dgilbert@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
From: Richard Henderson <rth@twiddle.net>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Richard Henderson <rth@twiddle.net>
|
|
|
9ae3a8 |
Message-id: 1375208443-17288-2-git-send-email-rth@twiddle.net
|
|
|
9ae3a8 |
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
|
|
9ae3a8 |
(cherry picked from commit e76c756fd3d3b652c6a65ebe16f2bfb25b8d025e)
|
|
|
9ae3a8 |
Signed-off-by: Markus Armbruster <armbru@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
hw/core/qdev-properties.c | 2 +-
|
|
|
9ae3a8 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
hw/core/qdev-properties.c | 2 +-
|
|
|
9ae3a8 |
1 files changed, 1 insertions(+), 1 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c
|
|
|
9ae3a8 |
index 8d43a8d..d6d10c9 100644
|
|
|
9ae3a8 |
--- a/hw/core/qdev-properties.c
|
|
|
9ae3a8 |
+++ b/hw/core/qdev-properties.c
|
|
|
9ae3a8 |
@@ -1177,7 +1177,7 @@ static int print_size(DeviceState *dev, Property *prop, char *dest, size_t len)
|
|
|
9ae3a8 |
int i = 0;
|
|
|
9ae3a8 |
uint64_t div;
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
- for (div = (long int)1 << 40; !(*ptr / div) ; div >>= 10) {
|
|
|
9ae3a8 |
+ for (div = 1ULL << 40; !(*ptr / div) ; div >>= 10) {
|
|
|
9ae3a8 |
i++;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
return snprintf(dest, len, "%0.03f%c", (double)*ptr/div, suffixes[i]);
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.7.1
|
|
|
9ae3a8 |
|