• W
    fix virsh's regression · 2225a491
    Wen Congyang 提交于
    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.
    2225a491
virsh.c 361.4 KB