diff options
author | Floris Bos <bos@je-eigen-domein.nl> | 2012-03-13 13:31:47 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2012-04-05 14:54:39 +0200 |
commit | 95ebda85e09ed2b7f00deb2adbdafa5ccf5db948 (patch) | |
tree | 11724250febc3065d5b7d61e50c800a6932bb451 /hw/ide/qdev.c | |
parent | aa2c91bdfebbfa314e9522573a9656626e21ac67 (diff) |
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>
Diffstat (limited to 'hw/ide/qdev.c')
-rw-r--r-- | hw/ide/qdev.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c index 07227c7455..a46578d685 100644 --- a/hw/ide/qdev.c +++ b/hw/ide/qdev.c @@ -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) |