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: NEric Blake <eblake@redhat.com>
Showing
想要评论请 注册 或 登录