Re: [Qemu-devel] [PATCH v2] numa: clarify error message when node index is out of range in -numa dist, ...

2018-05-16 Thread Eric Blake
On 05/16/2018 09:32 AM, Igor Mammedov wrote: Actually, error_setg() is documented as taking a single phrase (no '.' included), and that if you need a second sentence, it's better to use error_append_hint(). well, using append_hint makes it less readable, before using it we get following error:

Re: [Qemu-devel] [PATCH v2] numa: clarify error message when node index is out of range in -numa dist, ...

2018-05-16 Thread Igor Mammedov
On Tue, 15 May 2018 19:37:02 +0200 Markus Armbruster wrote: > Eric Blake writes: > > > On 05/15/2018 10:26 AM, Andrew Jones wrote: > >> On Tue, May 15, 2018 at 04:48:33PM +0200, Igor Mammedov wrote: > >>> When using following CLI: > >>>-numa dist,src=128,dst=1,val=20 > >>> user gets a r

Re: [Qemu-devel] [PATCH v2] numa: clarify error message when node index is out of range in -numa dist, ...

2018-05-15 Thread Markus Armbruster
Eric Blake writes: > On 05/15/2018 10:26 AM, Andrew Jones wrote: >> On Tue, May 15, 2018 at 04:48:33PM +0200, Igor Mammedov wrote: >>> When using following CLI: >>>-numa dist,src=128,dst=1,val=20 >>> user gets a rather confusing error message: >>> "Invalid node 128, max possible could be

Re: [Qemu-devel] [PATCH v2] numa: clarify error message when node index is out of range in -numa dist, ...

2018-05-15 Thread Eric Blake
On 05/15/2018 10:26 AM, Andrew Jones wrote: On Tue, May 15, 2018 at 04:48:33PM +0200, Igor Mammedov wrote: When using following CLI: -numa dist,src=128,dst=1,val=20 user gets a rather confusing error message: "Invalid node 128, max possible could be 128" Where 128 is number of nodes that

Re: [Qemu-devel] [PATCH v2] numa: clarify error message when node index is out of range in -numa dist, ...

2018-05-15 Thread Andrew Jones
On Tue, May 15, 2018 at 04:48:33PM +0200, Igor Mammedov wrote: > When using following CLI: > -numa dist,src=128,dst=1,val=20 > user gets a rather confusing error message: >"Invalid node 128, max possible could be 128" > > Where 128 is number of nodes that QEMU supports (MAX_NODES), > while s

[Qemu-devel] [PATCH v2] numa: clarify error message when node index is out of range in -numa dist, ...

2018-05-15 Thread Igor Mammedov
When using following CLI: -numa dist,src=128,dst=1,val=20 user gets a rather confusing error message: "Invalid node 128, max possible could be 128" Where 128 is number of nodes that QEMU supports (MAX_NODES), while src/dst is an index up to that limit, so it should be MAX_NODES - 1 in error m