diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2009-07-22 16:42:58 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-07-27 14:08:23 -0500 |
commit | 1dae12e6d02f8714c04bc0681ef4527980b13a9a (patch) | |
tree | 23ffa374e7c2a043dc545a6e2813afbc0f42ae2c /sysemu.h | |
parent | 751c6a17042b5d011013d6963c0505d671cf708e (diff) | |
download | qemu-1dae12e6d02f8714c04bc0681ef4527980b13a9a.zip qemu-1dae12e6d02f8714c04bc0681ef4527980b13a9a.tar.gz qemu-1dae12e6d02f8714c04bc0681ef4527980b13a9a.tar.bz2 |
add support for drive ids.
-drive accepts the new id= now, allowing to explicitely name your
drives. They will show up with that name in "info block" if specified,
otherwise the existing namimg scheme is used to autogenerate one.
There is also a new function to lookup drives by name. Not used yet.
The plan is to link disk drivers and drives using the drive id instead
of passing around pointers to BlockDriveState.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'sysemu.h')
-rw-r--r-- | sysemu.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -161,6 +161,7 @@ typedef enum { typedef struct DriveInfo { BlockDriverState *bdrv; + char *id; const char *devaddr; BlockInterfaceType type; int bus; @@ -178,6 +179,7 @@ typedef struct DriveInfo { extern TAILQ_HEAD(drivelist, DriveInfo) drives; extern DriveInfo *drive_get(BlockInterfaceType type, int bus, int unit); +extern DriveInfo *drive_get_by_id(char *id); extern int drive_get_max_bus(BlockInterfaceType type); extern void drive_uninit(BlockDriverState *bdrv); extern void drive_remove(int index); |