[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH 07/13] Convert all files in src/conf/ to use virReportError()



On 07/18/2012 05:52 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange redhat com>
> 
> This rmoves all the per-file error reporting macros

s/rmoves/removes/

> from the code in src/conf/
> 
> Signed-off-by: Daniel P. Berrange <berrange redhat com>
> ---
>  28 files changed, 1912 insertions(+), 1927 deletions(-)

Eep, that's big, so I'm assuming it's mostly mechanical.  But I didn't
spot anything obviously wrong while skimming through this message, other
than the typo in the commit log.

ACK.

> +++ b/src/nwfilter/nwfilter_dhcpsnoop.c
> @@ -69,6 +69,10 @@
>  
>  #define VIR_FROM_THIS VIR_FROM_NWFILTER
>  
> +#define virNWFilterReportError(code, fmt...)                       \
> +    virReportErrorHelper(VIR_FROM_NWFILTER, code, __FILE__,        \
> +                         __FUNCTION__, __LINE__, fmt)
> +
>  #ifdef HAVE_LIBPCAP
>  
>  # define LEASEFILE LOCALSTATEDIR "/run/libvirt/network/nwfilter.leases"

I first thought "What for?" when I saw this; then I realized - you
removed it out of the .h, but as this is src/nwfilter and not src/conf,
you had to (temporarily) re-add it here in the .c to keep things
compiling, and a later patch will again nuke it.  Nothing to see here,
move on...

> +++ b/src/test/test_driver.c
> @@ -5129,7 +5129,7 @@ testNodeDeviceLookupByName(virConnectPtr conn, const char *name)
>      testDriverUnlock(driver);
>  
>      if (!obj) {
> -        virNodeDeviceReportError(VIR_ERR_NO_NODE_DEVICE, NULL);
> +        testError(VIR_ERR_NO_NODE_DEVICE, NULL);

Even more fun - we were using the wrong error (thanks to the .h
pollution), but will still touch this line again in later patches.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]