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

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

On 05/14/2015 08:33 PM, Michal Privoznik wrote:
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 redhat com>
  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.

Thanks for your review and help.



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