mirror of https://gitee.com/openkylin/libvirt.git
qemu: command: Unify values for boolean values when formating memory backends
QEMU's qapi visitor code allows yes/on/y for true and no/off/n for false value of boolean properities. Unify the used style so that we can generate it later and fix test cases.
This commit is contained in:
parent
172100ac85
commit
a47174c508
|
@ -4628,11 +4628,11 @@ qemuBuildMemoryBackendStr(unsigned long long size,
|
|||
|
||||
switch (memAccess) {
|
||||
case VIR_MEM_ACCESS_SHARED:
|
||||
virBufferAddLit(&buf, ",share=on");
|
||||
virBufferAddLit(&buf, ",share=yes");
|
||||
break;
|
||||
|
||||
case VIR_MEM_ACCESS_PRIVATE:
|
||||
virBufferAddLit(&buf, ",share=off");
|
||||
virBufferAddLit(&buf, ",share=no");
|
||||
break;
|
||||
|
||||
case VIR_MEM_ACCESS_DEFAULT:
|
||||
|
|
|
@ -4,11 +4,11 @@ LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \
|
|||
mem-path=/dev/hugepages1G/libvirt/qemu,size=1024M,host-nodes=0-3,policy=bind \
|
||||
-numa node,nodeid=0,cpus=0,memdev=ram-node0 \
|
||||
-object memory-backend-file,id=ram-node1,prealloc=yes,\
|
||||
mem-path=/dev/hugepages2M/libvirt/qemu,share=on,size=1024M,host-nodes=0-3,\
|
||||
mem-path=/dev/hugepages2M/libvirt/qemu,share=yes,size=1024M,host-nodes=0-3,\
|
||||
policy=bind \
|
||||
-numa node,nodeid=1,cpus=1,memdev=ram-node1 \
|
||||
-object memory-backend-file,id=ram-node2,prealloc=yes,\
|
||||
mem-path=/dev/hugepages1G/libvirt/qemu,share=off,size=1024M,host-nodes=0-3,\
|
||||
mem-path=/dev/hugepages1G/libvirt/qemu,share=no,size=1024M,host-nodes=0-3,\
|
||||
policy=bind \
|
||||
-numa node,nodeid=2,cpus=2,memdev=ram-node2 \
|
||||
-object memory-backend-file,id=ram-node3,prealloc=yes,\
|
||||
|
|
Loading…
Reference in New Issue