virtio-blk: avoid qdev property definition duplication
commitdc80ca6cd6cafdee174af3c883d85e19b7fd70a5
authorStefan Hajnoczi <stefanha@redhat.com>
Wed, 18 Jun 2014 09:58:29 +0000 (18 17:58 +0800)
committerStefan Hajnoczi <stefanha@redhat.com>
Tue, 1 Jul 2014 07:15:02 +0000 (1 09:15 +0200)
tree60444c59542bb386cb8625b9b07be046ba56c9bd
parentef7c7ff6d4ca1955278af1bc5025f47044183250
virtio-blk: avoid qdev property definition duplication

It becomes unwiedly to duplicate all virtio-blk qdev property
definitions due to an #ifdef.  The C preprocessor syntax makes it a
little hard to resolve this cleanly but we can extract the #ifdef and
call a macro it defines later.

Avoiding duplication is important since it will only get worse when we
move the x-data-plane qdev property here too.  We'd have a combinatorial
explosion since x-data-plane has its own #ifdef.

Suggested-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
include/hw/virtio/virtio-blk.h