Skip to contentSkip to conversation

Basic qdev infrastructure.

Qemu-devel Blue Swirl 2 participants 2 messages May 16, 2009 – May 17, 2009 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Blue Swirl

author
#1 lore raw
Quoted 8 lines · Anthony Liguori

From: Paul Brook <[email protected]>

+struct DeviceProperty {
+ const char *name;
+ union {
+ int i;

qdev_set_prop_int uses also 'int' but qdev_get_prop_int returns uint64_t.

Quoted 5 lines

+struct DeviceType {

 +    const char *name;
 +    qdev_initfn init;
 +    void *opaque;
 +    int size;

size_t size?

Quoted 2 lines

+DeviceType *qdev_register(const char *name, int size, qdev_initfn init,
+ void *opaque)

size_t size?

Quoted 3 lines

+void qdev_set_prop_int(DeviceState *dev, const char *name, int value)

+uint64_t qdev_get_prop_int(DeviceState *dev, const char *name, uint64_t def)

#2 lore raw
Quoted 4 lines
Quoted 2 lines

+struct DeviceProperty {
+ int i;

qdev_set_prop_int uses also 'int' but qdev_get_prop_int returns uint64_t.

Fixed.

Quoted 4 lines
Quoted 2 lines

+struct DeviceType {
+ int size;

size_t size?

Technically yes. However if we ever get devices with >2G of internal state we have much bigger problems :-)

Paul