diff options
author | Amit Shah <amit.shah@redhat.com> | 2010-02-25 17:24:43 +0530 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2010-03-08 11:30:09 -0600 |
commit | 75422b0d38029d2e098309da4dd7199dc7b2d2a9 (patch) | |
tree | ab5c58bc5ee0cf64c0dc43e610f7c8c04b065937 /hw | |
parent | 1a8e2aaa3fb495e7f3d2ace1900fc104151b1b28 (diff) |
qdev: Add a DEV_NVECTORS_UNSPECIFIED enum for unspecified nr of MSI vectors
net.c used a constant to signify no MSI vectors were specified. Extend
that to all qdev devices.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Reported-by: "Michael S. Tsirkin" <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/qdev.c | 2 | ||||
-rw-r--r-- | hw/qdev.h | 4 |
2 files changed, 5 insertions, 1 deletions
@@ -387,7 +387,7 @@ void qdev_set_nic_properties(DeviceState *dev, NICInfo *nd) qdev_prop_set_vlan(dev, "vlan", nd->vlan); if (nd->netdev) qdev_prop_set_netdev(dev, "netdev", nd->netdev); - if (nd->nvectors != NIC_NVECTORS_UNSPECIFIED && + if (nd->nvectors != DEV_NVECTORS_UNSPECIFIED && qdev_prop_exists(dev, "vectors")) { qdev_prop_set_uint32(dev, "vectors", nd->nvectors); } @@ -24,6 +24,10 @@ enum DevState { DEV_STATE_INITIALIZED, }; +enum { + DEV_NVECTORS_UNSPECIFIED = -1, +}; + /* This structure should not be accessed directly. We declare it here so that it can be embedded in individual device state structures. */ struct DeviceState { |