[libvirt] [PATCH 02/49] list: Rename virdomainlist.[ch] for common use

Eric Blake eblake at redhat.com
Fri Jul 20 17:22:43 UTC 2012


On 07/20/2012 08:24 AM, Osier Yang wrote:
> Except objects of domains, domain snapshots, we will also add APIs
> to list objects like storage pools, storage vols, network, interface,
> etc. And it's deserved to have the small helper functions in a
> common file instead of in separate files.
> 
> This patch renames virdomainlist.[ch] to virobjectlist.[ch], and
> also renames the macros to filter domain objects more specificly.

s/specificly/specifically/

> 
> src/conf/virdomainlist.c: Renamed to src/conf/virobjectlist.c
> src/conf/virdomainlist.h: Renamed to src/conf/virobjectlist.h

Looks reasonable.

> @@ -31,7 +33,7 @@
>  #include "datatypes.h"
>  #include "virterror_internal.h"
>  
> -#define VIR_FROM_THIS VIR_FROM_DOMAIN
> +#define VIR_FROM_THIS VIR_FROM_NONE

I'm debating whether:

s/VIR_FROM_NONE/VIR_FROM_CONF/

makes sense.  Or maybe you keep the file organized in sections, and
between each section, you:

#undef VIR_FROM_THIS
#define VIR_FROM_THIS VIR_FROM_SECRET
// secret listing
#undef VIR_FROM_THIS
#define VIR_FROM_THIS VIR_FROM_DOMAIN_SNAPSHOT
// snapshot listing

and so forth.  That way, the error messages will be a bit better.

ACK.

-- 
Eric Blake   eblake at 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: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120720/0eaab5bf/attachment-0001.sig>


More information about the libvir-list mailing list