qdev: accept both strings and integers for PCI addresses
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 9 Feb 2012 08:53:32 +0000 (09:53 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 22 Feb 2012 07:31:24 +0000 (08:31 +0100)
commit768a9ebe188bd0a6172a9a4e64777d21fff7f014
tree54ab3af677bc62835d7d5db7dd3e2f6465205552
parentb2cd7dee86f27b6307b4bd411133bfb6ebc2be66
qdev: accept both strings and integers for PCI addresses

Visitors allow a limited form of polymorphism.  Exploit it to support
setting the non-legacy PCI address property both as a DD.F string
and as an 8-bit integer.

The 8-bit integer form is just too clumsy, it is unlikely that we will
ever drop it.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/qdev-properties.c