libvirt/tests/bhyvexml2argvmock.c
Ján Tomko 0d94f02455 tests: use G_GNUC_UNUSED
Use G_GNUC_UNUSED from GLib instead of ATTRIBUTE_UNUSED.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2019-10-15 11:25:25 +02:00

63 lines
1.9 KiB
C

#include <config.h>
#include "viralloc.h"
#include "virstring.h"
#include "virnetdev.h"
#include "virnetdevtap.h"
#include "internal.h"
#define VIR_FROM_THIS VIR_FROM_BHYVE
void virMacAddrGenerate(const unsigned char prefix[VIR_MAC_PREFIX_BUFLEN],
virMacAddrPtr addr)
{
addr->addr[0] = prefix[0];
addr->addr[1] = prefix[1];
addr->addr[2] = prefix[2];
addr->addr[3] = 0;
addr->addr[4] = 0;
addr->addr[5] = 0;
}
int virNetDevTapCreateInBridgePort(const char *brname G_GNUC_UNUSED,
char **ifname,
const virMacAddr *macaddr G_GNUC_UNUSED,
const unsigned char *vmuuid G_GNUC_UNUSED,
const char *tunpath G_GNUC_UNUSED,
int *tapfd G_GNUC_UNUSED,
size_t tapfdSize G_GNUC_UNUSED,
virNetDevVPortProfilePtr virtPortProfile G_GNUC_UNUSED,
virNetDevVlanPtr virtVlan G_GNUC_UNUSED,
virNetDevCoalescePtr coalesce G_GNUC_UNUSED,
unsigned int mtu G_GNUC_UNUSED,
unsigned int *actualMTU G_GNUC_UNUSED,
unsigned int fakeflags G_GNUC_UNUSED)
{
VIR_FREE(*ifname);
if (VIR_STRDUP(*ifname, "vnet0") < 0)
return -1;
return 0;
}
char *virNetDevTapGetRealDeviceName(char *name G_GNUC_UNUSED)
{
char *fakename;
if (VIR_STRDUP(fakename, "faketapdev") < 0)
return NULL;
return fakename;
}
int virNetDevSetOnline(const char *ifname G_GNUC_UNUSED,
bool online G_GNUC_UNUSED)
{
return 0;
}
int bind(int sockfd G_GNUC_UNUSED,
const struct sockaddr *addr G_GNUC_UNUSED,
socklen_t addrlen G_GNUC_UNUSED)
{
return 0;
}