Re: [PATCHv2] virsh: fix no error output when parse cpulist fail

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11.05.2015 10:25, Luyao Huang wrote:
> When we pass a invalid cpulist or the lastcpu in the
> cpulist exceed the maxcpu, we cannot get any error.
> like this:
> 
>  # virsh vcpupin test3 1 aaa
> 
>  # virsh vcpupin test3 1 1000
> 
> Because virBitmapParse() use virReportError() to set
> the error message, vshCommandRun would output the error
> in vshReportError, but in the meantime it is overwriten
> by the virResetLastError in virDomainFree. If we want use
> the error which set by virReportError(), we need vshSaveLibvirtError
> to help us. However the error from virBitmap is not clearly
> enough, i chose use vshError to output error when parse failed.
> 
> Signed-off-by: Luyao Huang <lhuang@xxxxxxxxxx>
> ---
> v2:
>  Add the check in vshParseCPUList, because this will make
>  get last cpu more easier when the cpulist is a bitmap.
> 
>  tools/virsh-domain.c | 21 +++++++++++++++------
>  1 file changed, 15 insertions(+), 6 deletions(-)

Reworded the commit message a bit, ACKed and pushed.

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]