Re: [PATCH 1/3] Turn libvirt.c error reporting functions into macros

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

 



On 01/18/2011 10:31 AM, Daniel P. Berrange wrote:
> The virLibConnError() function (and related ones) do not correctly
> report line number info. Turn them all into macros so line numbers
> are reported correctly. Drop the connection object in all of them
> since it is no longer used.
> 
> Also from the virLibConnWarning() equivalents completely. Now
> that the Xen driver is running 100% inside libvirtd, those
> codepaths for secondary drivers cannot be reached.
> 
> * src/libvirt.c: Replace error functions with macros
> ---
>  src/libvirt.c | 1708 ++++++++++++++++++++++++---------------------------------
>  1 files changed, 717 insertions(+), 991 deletions(-)

Large, but mostly mechanical.

> @@ -1302,7 +1059,7 @@ do_open (const char *name,
>  
>      if (!ret->driver) {
>          /* If we reach here, then all drivers declined the connection. */
> -        virLibConnError (NULL, VIR_ERR_NO_CONNECT, name);
> +        virLibConnError(VIR_ERR_NO_CONNECT, "No connection for URI %s", NULLSTR(name));

Looks like converting to a macro helped the compiler give better
warnings, too.

ACK.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]