summaryrefslogtreecommitdiffstats
path: root/hw/ide/internal.h
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2010-01-14 14:44:12 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2010-01-19 16:31:04 -0600
commit47c063403065793ad6e1d2fdde27d69a00880752 (patch)
tree1126fed51a7c0d0a382bae6aa3f32e31b4b401b2 /hw/ide/internal.h
parentf039a563f200beee80cc10fd70b21ea396979dab (diff)
downloadhqemu-47c063403065793ad6e1d2fdde27d69a00880752.zip
hqemu-47c063403065793ad6e1d2fdde27d69a00880752.tar.gz
ide: device version property
This patch adds a new property named 'ver' to ide-drive which allows to specify the version which the virtual disk/cdrom should report to the guest. By default this is the qemu version (i.e. 0.12). usage: -drive if=none,id=disk,file=... -device ide-drive,bus=ide.0,unit=0,drive=disk,ver=42 You can also switch the version for all ide drives using: -global ide-drive.ver=42 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/ide/internal.h')
-rw-r--r--hw/ide/internal.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/ide/internal.h b/hw/ide/internal.h
index eb5b404..1cc4b55 100644
--- a/hw/ide/internal.h
+++ b/hw/ide/internal.h
@@ -397,6 +397,7 @@ struct IDEState {
/* set for lba48 access */
uint8_t lba48;
BlockDriverState *bs;
+ char version[9];
/* ATAPI specific */
uint8_t sense_key;
uint8_t asc;
@@ -449,6 +450,7 @@ struct IDEDevice {
DeviceState qdev;
uint32_t unit;
DriveInfo *dinfo;
+ char *version;
};
typedef int (*ide_qdev_initfn)(IDEDevice *dev);
@@ -549,7 +551,7 @@ uint32_t ide_data_readw(void *opaque, uint32_t addr);
void ide_data_writel(void *opaque, uint32_t addr, uint32_t val);
uint32_t ide_data_readl(void *opaque, uint32_t addr);
-void ide_init_drive(IDEState *s, DriveInfo *dinfo);
+void ide_init_drive(IDEState *s, DriveInfo *dinfo, const char *version);
void ide_init2(IDEBus *bus, DriveInfo *hd0, DriveInfo *hd1,
qemu_irq irq);
void ide_init_ioport(IDEBus *bus, int iobase, int iobase2);
OpenPOWER on IntegriCloud