]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Allow the disk wwn to have "0x" prefix
authorOsier Yang <jyang@redhat.com>
Wed, 17 Apr 2013 13:23:44 +0000 (21:23 +0800)
committerOsier Yang <jyang@redhat.com>
Wed, 17 Apr 2013 15:05:56 +0000 (23:05 +0800)
commit09d2547f96920c6fddc00ea3f1efcafb65c0845b
treea9f0849054eca3665811a42084e6696fa07708d6
parent5829054caf397a083093803f8f1c94f565d07339
qemu: Allow the disk wwn to have "0x" prefix

The recent qemu requires "0x" prefix for the disk wwn, this patch
changes virValidateWWN to allow the prefix, and prepend "0x" if
it's not specified. E.g.

qemu-kvm: -device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,\
drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,wwn=6000c60016ea71ad:
Property 'scsi-hd.wwn' doesn't take value '6000c60016ea71ad'

Though it's a qemu regression, but it's nice to allow the prefix,
and doesn't hurt for us to always output "0x".
docs/schemas/basictypes.rng
src/qemu/qemu_command.c
src/util/virutil.c
tests/qemuxml2argvdata/qemuxml2argv-disk-ide-wwn.args
tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-disk-wwn.args
tests/qemuxml2argvdata/qemuxml2argv-disk-scsi-disk-wwn.xml