summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-rtnl
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-03-06 19:44:37 +0100
committerTom Gundersen <teg@jklm.no>2014-03-06 19:44:37 +0100
commitd22f1006a1910e32ff099330d70badaf2aec75c6 (patch)
tree0a77596ba5c1c89d789c7e3deb2cd1d7b11536a9 /src/libsystemd/sd-rtnl
parent44caa5e7dfa2160f7d644d003de2718fd3ca2ee6 (diff)
sd-rtnl/networkd: use new rtnl_message_read() API and drop helper
With the new sd_rtnl_message_read_string(), there is no longer a need for rtnl_message_get_ifname().
Diffstat (limited to 'src/libsystemd/sd-rtnl')
-rw-r--r--src/libsystemd/sd-rtnl/rtnl-util.c16
-rw-r--r--src/libsystemd/sd-rtnl/rtnl-util.h2
2 files changed, 0 insertions, 18 deletions
diff --git a/src/libsystemd/sd-rtnl/rtnl-util.c b/src/libsystemd/sd-rtnl/rtnl-util.c
index fc834e9554..c8b20d109e 100644
--- a/src/libsystemd/sd-rtnl/rtnl-util.c
+++ b/src/libsystemd/sd-rtnl/rtnl-util.c
@@ -153,19 +153,3 @@ bool rtnl_message_type_is_addr(uint16_t type) {
return false;
}
}
-
-int rtnl_message_link_get_ifname(sd_rtnl_message *message, const char **ret) {
- unsigned short type;
- void *name;
-
- assert(rtnl_message_type_is_link(message->hdr->nlmsg_type));
-
- while (sd_rtnl_message_read(message, &type, &name)) {
- if (type == IFLA_IFNAME) {
- *ret = name;
- return 0;
- }
- }
-
- return -ENOENT;
-}
diff --git a/src/libsystemd/sd-rtnl/rtnl-util.h b/src/libsystemd/sd-rtnl/rtnl-util.h
index 33746afe2b..7fe922272e 100644
--- a/src/libsystemd/sd-rtnl/rtnl-util.h
+++ b/src/libsystemd/sd-rtnl/rtnl-util.h
@@ -37,8 +37,6 @@ bool rtnl_message_type_is_route(uint16_t type);
int rtnl_set_link_name(sd_rtnl *rtnl, int ifindex, const char *name);
int rtnl_set_link_properties(sd_rtnl *rtnl, int ifindex, const char *alias, const struct ether_addr *mac, unsigned mtu);
-int rtnl_message_link_get_ifname(sd_rtnl_message *m, const char **ret);
-
DEFINE_TRIVIAL_CLEANUP_FUNC(sd_rtnl*, sd_rtnl_unref);
DEFINE_TRIVIAL_CLEANUP_FUNC(sd_rtnl_message*, sd_rtnl_message_unref);