Re: [libvirt] [PATCH] nodeinfo: fix nodeGetFreePages when max node is zero

2014-09-24 Thread Jincheng Miao
On 09/24/2014 08:53 PM, Michal Privoznik wrote: On 24.09.2014 14:00, Jincheng Miao wrote: On 09/24/2014 07:40 PM, Michal Privoznik wrote: On 24.09.2014 07:45, Jincheng Miao wrote: In nodeGetFreePages, if startCell is given by '0', and the max node number is '0' too. The for-loop wouldn't be

Re: [libvirt] [PATCH] nodeinfo: fix nodeGetFreePages when max node is zero

2014-09-24 Thread Michal Privoznik
On 24.09.2014 14:00, Jincheng Miao wrote: On 09/24/2014 07:40 PM, Michal Privoznik wrote: On 24.09.2014 07:45, Jincheng Miao wrote: In nodeGetFreePages, if startCell is given by '0', and the max node number is '0' too. The for-loop wouldn't be executed. So convert it to while-loop. Before: v

Re: [libvirt] [PATCH] nodeinfo: fix nodeGetFreePages when max node is zero

2014-09-24 Thread Jincheng Miao
On 09/24/2014 07:40 PM, Michal Privoznik wrote: On 24.09.2014 07:45, Jincheng Miao wrote: In nodeGetFreePages, if startCell is given by '0', and the max node number is '0' too. The for-loop wouldn't be executed. So convert it to while-loop. Before: virsh freepages --cellno 0 --pagesize 4 err

Re: [libvirt] [PATCH] nodeinfo: fix nodeGetFreePages when max node is zero

2014-09-24 Thread Michal Privoznik
On 24.09.2014 07:45, Jincheng Miao wrote: In nodeGetFreePages, if startCell is given by '0', and the max node number is '0' too. The for-loop wouldn't be executed. So convert it to while-loop. Before: virsh freepages --cellno 0 --pagesize 4 error: internal error: no suitable info found After:

[libvirt] [PATCH] nodeinfo: fix nodeGetFreePages when max node is zero

2014-09-23 Thread Jincheng Miao
In nodeGetFreePages, if startCell is given by '0', and the max node number is '0' too. The for-loop wouldn't be executed. So convert it to while-loop. Before: > virsh freepages --cellno 0 --pagesize 4 error: internal error: no suitable info found After: > virsh freepages --cellno 0 --pagesize 4 4