X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fnetdev-vport.c;h=197e74bb24b54f1754affc9ecd43ae3329461123;hb=4617e2c141500f8b06d1e9b1478b286756a3e391;hp=5ea7cbd2ddb27fb6f5442e384b7f71eacc3850d3;hpb=ec61a01cd8ed73b13ffe042ddff4baf41f6b63e7;p=openvswitch diff --git a/lib/netdev-vport.c b/lib/netdev-vport.c index 5ea7cbd2..197e74bb 100644 --- a/lib/netdev-vport.c +++ b/lib/netdev-vport.c @@ -110,7 +110,7 @@ netdev_vport_parse_config(const struct netdev_class *netdev_class, info.devname = name; info.type = netdev_class->type; error = (c->parse_config)(&info, args); - *configp = info.config; + *configp = error ? NULL : info.config; return error; } else { if (!shash_is_empty(args)) { @@ -124,8 +124,7 @@ netdev_vport_parse_config(const struct netdev_class *netdev_class, static int netdev_vport_create(const struct netdev_class *class, const char *name, - const struct shash *args OVS_UNUSED, - struct netdev_dev **netdev_devp) + const struct shash *args, struct netdev_dev **netdev_devp) { int err; struct odp_vport_add ova; @@ -386,8 +385,7 @@ netdev_vport_poll_add(struct netdev *netdev, if (!shash_node) { list = xmalloc(sizeof *list); list_init(list); - shash_node = shash_add(&netdev_vport_notifiers, - netdev_get_name(netdev), list); + shash_node = shash_add(&netdev_vport_notifiers, poll_name, list); } else { list = shash_node->data; }