Skip to content
  • Eduardo Habkost's avatar
    qemu_fclose: return last_error if set (v3) · d82ca915
    Eduardo Habkost authored
    
    
    This will make sure no error will be missed as long as callers always
    check for qemu_fclose() return value. For reference, this is the
    complete list of qemu_fclose() callers:
    
     - exec_close(): already fixed to check for negative values, not -1
     - migrate_fd_cleanup(): already fixed to consider only negative values
       as error, not any non-zero value
     - exec_accept_incoming_migration(): no return value check (yet)
     - fd_accept_incoming_migration(): no return value check (yet)
     - tcp_accept_incoming_migration(): no return value check (yet)
     - unix_accept_incoming_migration(): no return value check (yet)
     - do_savevm(): no return value check (yet)
     - load_vmstate(): no return value check (yet)
    
    Changes v1 -> v2:
     - Add small comment about the need to return previously-spotted errors
    
    Changes v2 -> v3:
     - Add braces to "if" statements to match coding style
    
    Signed-off-by: default avatarEduardo Habkost <ehabkost@redhat.com>
    Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
    d82ca915