From: Michael S. Tsirkin Date: Tue, 12 Jan 2010 19:16:59 +0000 (+0200) Subject: qdev: fix thinko leading to guest crashes X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=dbd483242c2e6dfaacb9fd3d20c333bbdad87243;p=qemu.git qdev: fix thinko leading to guest crashes Without this fix, guest crashes with drive=virtio. Signed-off-by: Michael S. Tsirkin Signed-off-by: Anthony Liguori --- diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c index 9e123ae8aa..277ff9e780 100644 --- a/hw/qdev-properties.c +++ b/hw/qdev-properties.c @@ -20,7 +20,7 @@ static void bit_prop_set(DeviceState *dev, Property *props, bool val) uint32_t *p = qdev_get_prop_ptr(dev, props); uint32_t mask = qdev_get_prop_mask(props); if (val) - *p |= ~mask; + *p |= mask; else *p &= ~mask; }