/*
- * Copyright (c) 2011, 2013 Nicira, Inc.
+ * Copyright (c) 2011, 2013, 2014 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
int (*vd_del)(const char *vlan_dev);
};
-#ifdef LINUX_DATAPATH
+#ifdef __linux__
static const struct vlandev_class vlandev_linux_class;
#endif
static const struct vlandev_class vlandev_stub_class;
vlandev_get_class(void)
{
if (!vd_class) {
-#ifdef LINUX_DATAPATH
+#if __linux__
vd_class = &vlandev_linux_class;
#else
vd_class = &vlandev_stub_class;
\f
/* The Linux vlandev implementation. */
-#ifdef LINUX_DATAPATH
+#ifdef __linux__
#include "rtnetlink-link.h"
#include <linux/if_vlan.h>
#include <linux/sockios.h>
char vlan_dev[16], real_dev[16];
int vid;
- if (sscanf(line, "%15[^ |] | %d | %15s",
- vlan_dev, &vid, real_dev) == 3) {
+ if (ovs_scan(line, "%15[^ |] | %d | %15s", vlan_dev, &vid, real_dev)) {
vlandev_add__(vlan_dev, real_dev, vid);
}
}
return EOPNOTSUPP;
}
-static const struct vlandev_class vlandev_stub_class = {
+static const struct vlandev_class OVS_UNUSED vlandev_stub_class = {
NULL, /* vd_refresh */
vlandev_stub_add,
vlandev_stub_del