]> xenbits.xensource.com Git - libvirt.git/commit
maint: improve VIR_ERR_INVALID_STORAGE_POOL usage
authorEric Blake <eblake@redhat.com>
Sat, 28 Dec 2013 01:12:05 +0000 (18:12 -0700)
committerEric Blake <eblake@redhat.com>
Wed, 8 Jan 2014 22:33:57 +0000 (15:33 -0700)
commit8add79a991e6ebc8b5440497e2ada2d1804aec59
tree8ce0ec6693533d83db7c2f7875bb555a58091194
parente093351209a4937631ec70d6007b096c6754dcce
maint: improve VIR_ERR_INVALID_STORAGE_POOL usage

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: Eric Blake <eblake@redhat.com>
src/datatypes.h
src/libvirt.c