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