hw/virtio/virtio-mem: Fix error message on invalid NUMA node
PATCH 1/1 hw/virtio/virtio-mem: Fix error message on invalid NUMA node
Add space as the separator between "exceeds" and "the number of numa nodes:". Otherwise, we will see error message with twisted format like below.
qemu-system-aarch64: -device virtio-mem-pci,id=vmem1,bus=pcie.3, \ memdev=virtio-mem1-mem,requested-size=0,node=1: 'node' property \ has value '1', which exceedsthe number of numa nodes: 1
Signed-off-by Gavin Shan <[email protected]>
--- hw/virtio/virtio-mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/virtio/virtio-mem.c +1 -1
@@ -846,7 +846,7 @@ static void virtio_mem_device_realize(DeviceState *dev, Error **errp)if ((nb_numa_nodes && vmem->node >= nb_numa_nodes) || (!nb_numa_nodes && vmem->node)) {error_setg (errp,"'%s' property has value '%" PRIu32"', which exceeds" -"the number of numa nodes: %d" ,VIRTIO_MEM_NODE_PROP , +" the number of numa nodes: %d" ,VIRTIO_MEM_NODE_PROP , vmem->node, nb_numa_nodes ? nb_numa_nodes :1 );return ; }
Signature · 1 line
2.56.0
Quoted 18 lines · Gavin Shan
Add space as the separator between "exceeds" and "the number of numa nodes:". Otherwise, we will see error message with twisted format like below.
qemu-system-aarch64: -device virtio-mem-pci,id=vmem1,bus=pcie.3, \ memdev=virtio-mem1-mem,requested-size=0,node=1: 'node' property \ has value '1', which exceedsthe number of numa nodes: 1Signed-off-by Gavin Shan <[email protected]>--- hw/virtio/virtio-mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/virtio/virtio-mem.c +0
-0
hw/virtio/virtio-mem.c static void virtio_mem_device_realize(DeviceState *dev, Error **errp) · line 852
Quoted 8 lines
hw/virtio/virtio-mem.c +1
-1@@ -846,7 +846,7 @@ static void virtio_mem_device_realize(DeviceState *dev, Error **errp)if ((nb_numa_nodes && vmem->node >= nb_numa_nodes) || (!nb_numa_nodes && vmem->node)) {error_setg (errp,"'%s' property has value '%" PRIu32"', which exceeds" -"the number of numa nodes: %d" ,VIRTIO_MEM_NODE_PROP , +" the number of numa nodes: %d" ,VIRTIO_MEM_NODE_PROP , vmem->node, nb_numa_nodes ? nb_numa_nodes :1 );return ; }
Reviewed-by David Hildenbrand <[email protected]>
Signature · 3 lines
Cheers, David