[libvirt] [PATCH 14/24] maint: improve VIR_ERR_INVALID_NETWORK usage
Eric Blake
eblake at redhat.com
Wed Jan 8 16:43:10 UTC 2014
On 01/02/2014 05:17 PM, John Ferlan wrote:
>
>
> On 12/28/2013 11:11 AM, Eric Blake wrote:
>> When checking for a valid network, we weren't consistent on
>> whether we reported an invalid network or a connection. Similar
>> to previous patches, use a common macro to make it nicer.
>>
>> * src/datatypes.h (virCheckNetworkReturn, virCheckNetworkGoto): New
>> macros.
>> (VIR_IS_NETWORK, VIR_IS_CONNECTED_NETWORK): Drop unused macros.
>> * src/libvirt.c: Use macro throughout.
>> (virLibNetworkError): Drop unused macro.
>>
>> Signed-off-by: Eric Blake <eblake at redhat.com>
>> ---
>> src/datatypes.h | 29 +++++++++++--
>> src/libvirt.c | 131 ++++++++++++++++----------------------------------------
>> 2 files changed, 61 insertions(+), 99 deletions(-)
>>
>
> Just making sure it's now expected that virNetworkGetName(),
> virNetworkGetUUID(), and virNetworkGetUUIDString() will now have to have
> a connected network just like the new requirement for the various domain
> API's that previously just cared about a domain regardless of connection.
A "connected network" is a network that points to a valid virConnectPtr.
But based on the way we do reference counting, this should ALWAYS be
the case for a valid network. This is the same intentional change as
was made for domains in commit 6e130dd. I'll tweak the commit message
to make the justification stronger.
>
> ACK for the mechanical parts...
Even though it is now after freeze, this was reviewed before freeze and
I think it's better to have the whole series in the release rather than
half-and-half. So I'll keep plowing through your review comments, and
in particular, I have now pushed this patch.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140108/3fb4aadd/attachment-0001.sig>
More information about the libvir-list
mailing list