summaryrefslogtreecommitdiff
path: root/vswitchd
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2011-08-05 14:18:06 -0700
committerBen Pfaff <blp@nicira.com>2011-08-08 12:55:43 -0700
commit18812dff32ce650440b9f1eac1bb00afe08c621a (patch)
tree1abd453fbc096d8eb300a0f6d514c4d24360e040 /vswitchd
parentde5cdb90f7c02d22b0595c7dc311c5306291b02f (diff)
downloadopenvswitch-18812dff32ce650440b9f1eac1bb00afe08c621a.tar.gz
netdev: Get rid of struct netdev_options and netdev_open_default().
Now that netdev_options only has two members, we might as well pass them directly as parameters.
Diffstat (limited to 'vswitchd')
-rw-r--r--vswitchd/bridge.c10
-rw-r--r--vswitchd/ovs-brcompatd.c2
2 files changed, 3 insertions, 9 deletions
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index ab8527c27..94668a733 100644
--- a/vswitchd/bridge.c
+++ b/vswitchd/bridge.c
@@ -850,10 +850,7 @@ bridge_add_ofproto_ports(struct bridge *br)
/* Open the netdev. */
if (!iface->netdev) {
- struct netdev_options options;
- options.name = iface->name;
- options.type = iface->type;
- error = netdev_open(&options, &iface->netdev);
+ error = netdev_open(iface->name, iface->type, &iface->netdev);
if (error) {
VLOG_WARN("could not open network device %s (%s)",
iface->name, strerror(error));
@@ -928,13 +925,10 @@ bridge_add_ofproto_ports(struct bridge *br)
if (port_is_bond_fake_iface(port)) {
if (ofproto_port_query_by_name(br->ofproto, port->name,
&ofproto_port)) {
- struct netdev_options options;
struct netdev *netdev;
int error;
- options.name = port->name;
- options.type = "internal";
- error = netdev_open(&options, &netdev);
+ error = netdev_open(port->name, "internal", &netdev);
if (!error) {
ofproto_port_add(br->ofproto, netdev, NULL);
netdev_close(netdev);
diff --git a/vswitchd/ovs-brcompatd.c b/vswitchd/ovs-brcompatd.c
index d9b3bc38d..c1cc8175e 100644
--- a/vswitchd/ovs-brcompatd.c
+++ b/vswitchd/ovs-brcompatd.c
@@ -488,7 +488,7 @@ handle_fdb_query_cmd(struct ofpbuf *buffer)
struct mac *mac = &local_macs[n_local_macs];
struct netdev *netdev;
- error = netdev_open_default(iface_name, &netdev);
+ error = netdev_open(iface_name, "system", &netdev);
if (!error) {
if (!netdev_get_etheraddr(netdev, mac->addr)) {
n_local_macs++;