mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
ide: Adds wwn=hex qdev option
Allow the user to specify a disk's World Wide Name. Linux guests can address disks by their unique World Wide Name number (e.g. /dev/disk/by-id/wwn-0x5001517959123522). This patch adds support for assigning a World Wide Name number to a virtual IDE disk. Cc: kwolf@redhat.com Signed-off-by: Floris Bos <dev@noc-ps.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
aa2c91bdfe
commit
95ebda85e0
3 changed files with 29 additions and 8 deletions
|
@ -137,7 +137,7 @@ static int ide_dev_initfn(IDEDevice *dev, IDEDriveKind kind)
|
|||
}
|
||||
|
||||
if (ide_init_drive(s, dev->conf.bs, kind,
|
||||
dev->version, serial, dev->model) < 0) {
|
||||
dev->version, serial, dev->model, dev->wwn) < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -174,6 +174,7 @@ static int ide_drive_initfn(IDEDevice *dev)
|
|||
#define DEFINE_IDE_DEV_PROPERTIES() \
|
||||
DEFINE_BLOCK_PROPERTIES(IDEDrive, dev.conf), \
|
||||
DEFINE_PROP_STRING("ver", IDEDrive, dev.version), \
|
||||
DEFINE_PROP_HEX64("wwn", IDEDrive, dev.wwn, 0), \
|
||||
DEFINE_PROP_STRING("serial", IDEDrive, dev.serial),\
|
||||
DEFINE_PROP_STRING("model", IDEDrive, dev.model)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue