]> git.ipfire.org Git - thirdparty/libvirt.git/commit
fix virsh's regression
authorWen Congyang <wency@cn.fujitsu.com>
Tue, 26 Apr 2011 03:03:04 +0000 (11:03 +0800)
committerWen Congyang <wency@cn.fujitsu.com>
Thu, 28 Apr 2011 04:25:59 +0000 (12:25 +0800)
commit2225a4910695ea593d39972e84208540d1616488
treef6c55ef3358b53e499588f28ac82b41f1a22de4a
parentab9102c232904e382ae768c249cea0ae45aef54c
fix virsh's regression

This patch does the following things:
1. The return value of cmdSchedInfoUpdate() can be -1, 0 and 1. So the
   type of return value should be int not bool.(This function is not a
   entry of a virsh command, but the name of this function likes cmdXXX)

2. The type of cmdSchedinfo()'s, cmdFreecell()'s, cmdPoolList()'s and
   cmdVolList()'s return value is bool not int, so change the type of
   variable ret_val, func_ret and functionReturn.

3. Add a variable functionReturn for cmdMigrate(), cmdAttachInterface(),
   cmdDetachInterface(), cmdAttachDisk() and cmdDetachDisk() to save the
   return value.

4. Change the type of variable ret in the function cmdAttachDevice(),
   cmdDetachDevice(), cmdUpdateDevice(), cmdAttachInterface(),
   cmdDetachInterface(), cmdAttachDisk() and cmdDetachDisk() to int, as
   we use it to save the return value of virXXX() and the type of virXXX()'s
   return value is int not bool.

5. Do some cleanup when virBuff.error is 1.

The bug 1-4 were introduced by commit b56fa5bb.
tools/virsh.c