Re: [libvirt] [PATCH v4] virsh: avoid missing zero value judgement in cmdBlkiotune

2011-07-28 Thread ajia
On 07/28/2011 10:31 PM, Eric Blake wrote: On 07/28/2011 08:25 AM, ajia wrote: - _("Unable to parse integer parameter")); + _("Unable to parse non-integer parameter")); Why this change? when I give a non-integer to weight value such as virsh blkiotune $domain --weight demo, vshError will be hit

Re: [libvirt] [PATCH v4] virsh: avoid missing zero value judgement in cmdBlkiotune

2011-07-28 Thread Eric Blake
On 07/28/2011 08:25 AM, ajia wrote: - _("Unable to parse integer parameter")); + _("Unable to parse non-integer parameter")); Why this change? when I give a non-integer to weight value such as virsh blkiotune $domain --weight demo, vshError will be hit and raise "Unable to parse integer paramet

Re: [libvirt] [PATCH v4] virsh: avoid missing zero value judgement in cmdBlkiotune

2011-07-28 Thread ajia
On 07/28/2011 07:20 PM, Michal Privoznik wrote: On 28.07.2011 13:13, Alex Jia wrote: * tools/virsh.c: fix missing zero value judgement in cmdBlkiotune and correct vshError information. when weight is equal to 0, the cmdBlkiotune will not raise any error information when judge weight

Re: [libvirt] [PATCH v4] virsh: avoid missing zero value judgement in cmdBlkiotune

2011-07-28 Thread Michal Privoznik
On 28.07.2011 13:13, Alex Jia wrote: * tools/virsh.c: fix missing zero value judgement in cmdBlkiotune and correct vshError information. when weight is equal to 0, the cmdBlkiotune will not raise any error information when judge weight value first time, and execute else branch to judge

[libvirt] [PATCH v4] virsh: avoid missing zero value judgement in cmdBlkiotune

2011-07-28 Thread ajia
* tools/virsh.c: fix missing zero value judgement in cmdBlkiotune and correct vshError information. when weight is equal to 0, the cmdBlkiotune will not raise any error information when judge weight value first time, and execute else branch to judge weight value again, strncpy(temp->field