From: Felix Fietkau Date: Fri, 29 Jul 2011 17:25:12 +0000 (+0200) Subject: s/get_device/device_get/ X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0b461898555d81efe1b57ec1cd9b9b1529cecd0f;p=oweals%2Fnetifd.git s/get_device/device_get/ --- diff --git a/bridge.c b/bridge.c index aff41fb..3372d20 100644 --- a/bridge.c +++ b/bridge.c @@ -199,7 +199,7 @@ bridge_add_member(struct bridge_state *bst, const char *name) { struct device *dev; - dev = get_device(name, true); + dev = device_get(name, true); if (!dev) return; @@ -321,7 +321,7 @@ bridge_create(const char *name, struct uci_section *s) struct bridge_state *bst; struct device *dev; - dev = get_device(name, false); + dev = device_get(name, false); if (dev) return NULL; diff --git a/device.c b/device.c index a71d908..3d787f9 100644 --- a/device.c +++ b/device.c @@ -79,7 +79,7 @@ device_create(struct blob_attr *attr, struct uci_section *s) if (!strcmp(blobmsg_data(cur), "bridge")) dev = bridge_create(name, s); } else { - dev = get_device(name, true); + dev = device_get(name, true); } if (!dev) @@ -197,7 +197,7 @@ int init_device(struct device *dev, const struct device_type *type, const char * return 0; } -struct device *get_device(const char *name, bool create) +struct device *device_get(const char *name, bool create) { static const struct device_type simple_type = { .name = "Device", diff --git a/device.h b/device.h index 33278c9..732ef02 100644 --- a/device.h +++ b/device.h @@ -132,7 +132,7 @@ struct device *device_create(struct blob_attr *attr, struct uci_section *s); void init_virtual_device(struct device *dev, const struct device_type *type, const char *name); int init_device(struct device *iface, const struct device_type *type, const char *ifname); void device_cleanup(struct device *iface); -struct device *get_device(const char *name, bool create); +struct device *device_get(const char *name, bool create); void device_add_user(struct device_user *dep, struct device *iface); void device_remove_user(struct device_user *dep); diff --git a/interface.c b/interface.c index 95ee8ea..22fe300 100644 --- a/interface.c +++ b/interface.c @@ -236,7 +236,7 @@ alloc_interface(const char *name, struct uci_section *s, struct blob_attr *attr) } if ((cur = tb[IFACE_ATTR_IFNAME])) { - dev = get_device(blobmsg_data(cur), true); + dev = device_get(blobmsg_data(cur), true); if (dev) device_add_user(&iface->main_dev, dev); } diff --git a/ubus.c b/ubus.c index 2e98b2b..fc58376 100644 --- a/ubus.c +++ b/ubus.c @@ -33,7 +33,7 @@ static int netifd_handle_device(struct ubus_context *ctx, struct ubus_object *ob if (!tb[DEV_NAME]) return UBUS_STATUS_INVALID_ARGUMENT; - dev = get_device(blobmsg_data(tb[DEV_NAME]), false); + dev = device_get(blobmsg_data(tb[DEV_NAME]), false); if (!dev) return UBUS_STATUS_NOT_FOUND; diff --git a/vlan.c b/vlan.c index 88604d3..208ff73 100644 --- a/vlan.c +++ b/vlan.c @@ -129,7 +129,7 @@ struct device *get_vlan_device_chain(const char *ifname, bool create) return NULL; s = split_vlan(buf); - iface = get_device(buf, create); + iface = device_get(buf, create); if (!iface && !create) goto error;