• E
    maint: improve VIR_ERR_INVALID_STORAGE_POOL usage · 8add79a9
    Eric Blake 提交于
    virStoragePoolBuild reported an invalid pool as if it were an
    invalid network.  Likewise, 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_POOL
    and VIR_IS_CONNECTED_STORAGE_POOL is moot (due to reference
    counting, any valid pool must be tied to a valid connection).
    For now, we don't need virCheckStoragePoolGoto().
    
    * src/datatypes.h (virCheckStoragePoolReturn): New macro.
    (VIR_IS_STORAGE_POOL, VIR_IS_CONNECTED_STORAGE_POOL): Drop
    unused macros.
    * src/libvirt.c: Use macro throughout.
    (virLibStoragePoolError): Drop unused macro.
    Signed-off-by: NEric Blake <eblake@redhat.com>
    8add79a9
datatypes.h 19.3 KB