X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fnetdev.c;h=2c7b260e1234544857083492e0a42b68b1ff3eba;hb=abaad8cf1b5089e17a4af0ab1ff644bfcf63cad9;hp=ddd6e92ceed5a0722b16dd542242c0f106c31a14;hpb=2ad2eb042517b975d761d456cceb5c9325c4aaa7;p=openvswitch diff --git a/lib/netdev.c b/lib/netdev.c index ddd6e92c..2c7b260e 100644 --- a/lib/netdev.c +++ b/lib/netdev.c @@ -59,7 +59,7 @@ static struct list netdev_list = LIST_INITIALIZER(&netdev_list); * additional log messages. */ static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 20); -static void close_all_netdevs(void *aux UNUSED); +static void close_all_netdevs(void *aux OVS_UNUSED); static int restore_flags(struct netdev *netdev); void update_device_args(struct netdev_dev *, const struct shash *args); @@ -89,9 +89,9 @@ netdev_run(void) { struct shash_node *node; SHASH_FOR_EACH(node, &netdev_classes) { - const struct netdev_class *class = node->data; - if (class->run) { - class->run(); + const struct netdev_class *netdev_class = node->data; + if (netdev_class->run) { + netdev_class->run(); } } } @@ -105,9 +105,9 @@ netdev_wait(void) { struct shash_node *node; SHASH_FOR_EACH(node, &netdev_classes) { - const struct netdev_class *class = node->data; - if (class->wait) { - class->wait(); + const struct netdev_class *netdev_class = node->data; + if (netdev_class->wait) { + netdev_class->wait(); } } } @@ -975,12 +975,12 @@ exit: * the refcount drops to zero. */ void netdev_dev_init(struct netdev_dev *netdev_dev, const char *name, - const struct netdev_class *class_) + const struct netdev_class *netdev_class) { assert(!shash_find(&netdev_dev_shash, name)); memset(netdev_dev, 0, sizeof *netdev_dev); - netdev_dev->netdev_class = class_; + netdev_dev->netdev_class = netdev_class; netdev_dev->name = xstrdup(name); netdev_dev->node = shash_add(&netdev_dev_shash, name, netdev_dev); } @@ -1035,19 +1035,19 @@ netdev_dev_from_name(const char *name) return shash_find_data(&netdev_dev_shash, name); } -/* Fills 'device_list' with devices that match 'class'. +/* Fills 'device_list' with devices that match 'netdev_class'. * * The caller is responsible for initializing and destroying 'device_list' * but the contained netdev_devs must not be freed. */ void -netdev_dev_get_devices(const struct netdev_class *class_, +netdev_dev_get_devices(const struct netdev_class *netdev_class, struct shash *device_list) { struct shash_node *node; SHASH_FOR_EACH (node, &netdev_dev_shash) { struct netdev_dev *dev = node->data; - if (dev->netdev_class == class_) { + if (dev->netdev_class == netdev_class) { shash_add(device_list, node->name, node->data); } } @@ -1265,7 +1265,7 @@ restore_flags(struct netdev *netdev) /* Close all netdevs on shutdown so they can do any needed cleanup such as * destroying devices, restoring flags, etc. */ static void -close_all_netdevs(void *aux UNUSED) +close_all_netdevs(void *aux OVS_UNUSED) { struct netdev *netdev, *next; LIST_FOR_EACH_SAFE(netdev, next, struct netdev, node, &netdev_list) {