From f7edba7b60d5a3d3cdd6e645ca5504863e395199 Mon Sep 17 00:00:00 2001 From: Michael S. Tsirkin Date: Tue, 2 Aug 2011 14:36:05 -0300 Subject: [RHEL6 qemu-kvm PATCH 3/3] qdev: Fix printout of bit device properties with bit index >= 8 RH-Author: Michael S. Tsirkin Message-id: <20110802143605.GA657@redhat.com> Patchwork-id: 30821 O-Subject: [PATCH RHEL6.2] qdev: Fix printout of bit device properties with bit index >= 8 Bugzilla: 727580 RH-Acked-by: Gerd Hoffmann RH-Acked-by: Amit Shah RH-Acked-by: Juan Quintela RH-Acked-by: Markus Armbruster RH-Acked-by: Amos Kong Signed-off-by: David 'Digit' Turner Acked-by: Markus Armbruster Signed-off-by: Aurelien Jarno (cherry picked from commit 5a5e3d55ffbcb81f97b4a6353f1649b1b9772938) Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=727580 Tested: on local box Brew: http://brewweb.devel.redhat.com/brew/taskinfo?taskID=3531438 --- hw/qdev-properties.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Signed-off-by: Eduardo Habkost --- hw/qdev-properties.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c index 5491276..7e9e3a6 100644 --- a/hw/qdev-properties.c +++ b/hw/qdev-properties.c @@ -51,7 +51,7 @@ static int parse_bit(DeviceState *dev, Property *prop, const char *str) static int print_bit(DeviceState *dev, Property *prop, char *dest, size_t len) { - uint8_t *p = qdev_get_prop_ptr(dev, prop); + uint32_t *p = qdev_get_prop_ptr(dev, prop); return snprintf(dest, len, (*p & qdev_get_prop_mask(prop)) ? "on" : "off"); } -- 1.7.3.2