097c9b5 maint: improve VIR_ERR_INVALID_STORAGE_VOL usage

Authored and Committed by ericb 10 years ago
    maint: improve VIR_ERR_INVALID_STORAGE_VOL usage
    
    For storage volume validation, we weren't consistent on
    whether to use VIR_FROM_NONE or VIR_FROM_STORAGE.  Similar
    to previous patches, use a common macro to make it nicer.
    Furthermore, just as in commit 6e130ddc, the difference
    between VIR_IS_STORAGE_VOL and VIR_IS_CONNECTED_STORAGE_VOL
    is moot (due to reference counting, any valid volume must
    be tied to a valid connection).
    
    virStorageVolCreateXMLFrom allows cross-connection cloning,
    where the error is reported against the connection of the
    destination pool.
    
    * src/datatypes.h (virCheckStorageVolReturn)
    (virCheckStorageVolGoto): New macros.
    (VIR_IS_STORAGE_VOL, VIR_IS_CONNECTED_STORAGE_VOL): Drop
    unused macros.
    * src/libvirt.c: Use macro throughout.
    (virLibStorageVolError): Drop unused macro.
    
    Signed-off-by: Eric Blake <eblake@redhat.com>
    
        
file modified
+25 -4
file modified
+24 -88