mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-09-08 16:07:39 -06:00
ide: Turn properties any IDE device must have into bus properties
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
d6cca4b048
commit
e0e8384dd4
1 changed files with 4 additions and 1 deletions
|
@ -31,6 +31,10 @@ static struct BusInfo ide_bus_info = {
|
||||||
.name = "IDE",
|
.name = "IDE",
|
||||||
.size = sizeof(IDEBus),
|
.size = sizeof(IDEBus),
|
||||||
.get_fw_dev_path = idebus_get_fw_dev_path,
|
.get_fw_dev_path = idebus_get_fw_dev_path,
|
||||||
|
.props = (Property[]) {
|
||||||
|
DEFINE_PROP_UINT32("unit", IDEDevice, unit, -1),
|
||||||
|
DEFINE_PROP_END_OF_LIST(),
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
void ide_bus_new(IDEBus *idebus, DeviceState *dev, int bus_id)
|
void ide_bus_new(IDEBus *idebus, DeviceState *dev, int bus_id)
|
||||||
|
@ -174,7 +178,6 @@ static int ide_drive_initfn(IDEDevice *dev)
|
||||||
}
|
}
|
||||||
|
|
||||||
#define DEFINE_IDE_DEV_PROPERTIES() \
|
#define DEFINE_IDE_DEV_PROPERTIES() \
|
||||||
DEFINE_PROP_UINT32("unit", IDEDrive, dev.unit, -1), \
|
|
||||||
DEFINE_BLOCK_PROPERTIES(IDEDrive, dev.conf), \
|
DEFINE_BLOCK_PROPERTIES(IDEDrive, dev.conf), \
|
||||||
DEFINE_PROP_STRING("ver", IDEDrive, dev.version), \
|
DEFINE_PROP_STRING("ver", IDEDrive, dev.version), \
|
||||||
DEFINE_PROP_STRING("serial", IDEDrive, dev.serial)
|
DEFINE_PROP_STRING("serial", IDEDrive, dev.serial)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue