*/
int virNetDevTapCreate(char **ifname,
int *tapfd,
- unsigned int flags ATTRIBUTE_UNUSED)
+ unsigned int flags)
{
int fd;
struct ifreq ifr;
int ret = -1;
+ virCheckFlags(VIR_NETDEV_TAP_CREATE_VNET_HDR, -1);
+
if ((fd = open("/dev/net/tun", O_RDWR)) < 0) {
virReportSystemError(errno, "%s",
_("Unable to open /dev/net/tun, is tun module loaded?"));
#else /* ! TUNSETIFF */
int virNetDevTapCreate(char **ifname ATTRIBUTE_UNUSED,
int *tapfd ATTRIBUTE_UNUSED,
- unsigned int flags ATTRIBUTE_UNUSED)
+ unsigned int flags)
{
+ virCheckFlags(0, -1);
virReportSystemError(ENOSYS, "%s",
_("Unable to create TAP devices on this platform"));
return -1;
int ret = 0;
if ((caps = testLXCCapsInit()) == NULL)
- return (EXIT_FAILURE);
+ return EXIT_FAILURE;
# define DO_TEST_FULL(name, is_different, inactive) \
do { \
virCapabilitiesFree(caps);
- return (ret==0 ? EXIT_SUCCESS : EXIT_FAILURE);
+ return ret==0 ? EXIT_SUCCESS : EXIT_FAILURE;
}
VIRT_TEST_MAIN(mymain)