[libvirt] [PATCH 1/2] Make virNetDevSetupControl() public.
Eric Blake
eblake at redhat.com
Sat May 25 13:07:49 UTC 2013
On 05/15/2013 11:47 PM, Roman Bogorodskiy wrote:
> This method is useful not only in virnetdev.c.
> ---
> src/libvirt_private.syms | 1 +
> src/util/virnetdev.c | 15 +++++++++++++--
> src/util/virnetdev.h | 12 ++++++++++++
> src/util/virnetdevmacvlan.c | 2 +-
> src/util/virnetdevvportprofile.c | 2 +-
> 5 files changed, 28 insertions(+), 4 deletions(-)
>
> +#else
> +int
> +virNetDevSetupControl(const char *ifname ATTRIBUTE_UNUSED,
> + void *ifr ATTRIBUTE_UNUSED)
> +{
> + virReportSystemError(ENOSYS,
> + _("%s is not supported on this platform"),
> + __func__);
virReportSystemError is already a macro that reports the function name,
so your message would include the name twice. But offhand, I can't
think of any better wording to use.
> +++ b/src/util/virnetdev.h
> @@ -23,11 +23,23 @@
> #ifndef __VIR_NETDEV_H__
> # define __VIR_NETDEV_H__
>
> +# include <config.h>
Headers should never need to include <config.h>. After all, the only
way to use a header is from a .c file, but the .c file should have
included <config.h> prior to any other header.
Looks reasonable once that is fixed up.
--
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: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130525/96f0e516/attachment-0001.sig>
More information about the libvir-list
mailing list