[libvirt] [PATCH v3 1/2] Move virBhyveTapGetRealDeviceName to virnetdevtap

Ján Tomko jtomko at redhat.com
Wed Mar 26 19:45:33 UTC 2014


On 03/26/2014 05:53 PM, Roman Bogorodskiy wrote:
> To ease mocking for bhyve unit tests move virBhyveTapGetRealDeviceName()
> out of bhyve_command.c to virnetdevtap and rename it to
> virNetDevTapGetRealDeviceName().
> ---
>  src/bhyve/bhyve_command.c | 74 +---------------------------------------
>  src/libvirt_private.syms  |  1 +
>  src/util/virnetdevtap.c   | 87 +++++++++++++++++++++++++++++++++++++++++++++++
>  src/util/virnetdevtap.h   |  3 ++
>  4 files changed, 92 insertions(+), 73 deletions(-)
> 

> diff --git a/src/util/virnetdevtap.c b/src/util/virnetdevtap.c
> index 32ad406..3072146 100644
> --- a/src/util/virnetdevtap.c
> +++ b/src/util/virnetdevtap.c
> @@ -22,6 +22,9 @@
>  
>  #include <config.h>
>  
> +#include <sys/types.h>
> +#include <dirent.h>
> +

I'd rather group these together with the other system headers below, but
that's not really an issue.

>  #include "virmacaddr.h"
>  #include "virnetdevtap.h"
>  #include "virnetdev.h"
> @@ -38,8 +41,11 @@
>  #include <fcntl.h>
>  #ifdef __linux__
>  # include <linux/if_tun.h>    /* IFF_TUN, IFF_NO_PI */
> +#elif defined(__FreeBSD__)
> +# include <net/if_tap.h>
>  #endif
>  
> +

Spurious blank line addition.

>  #define VIR_FROM_THIS VIR_FROM_NONE
>  
>  VIR_LOG_INIT("util.netdevtap");

ACK

Jan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140326/20161ee4/attachment-0001.sig>


More information about the libvir-list mailing list