netlink: move resolve_ifname() or friends to netlink-util.[ch]

This commit is contained in:
Yu Watanabe
2021-06-12 03:19:08 +09:00
parent f0ad7aedd9
commit f6e491547d
7 changed files with 56 additions and 58 deletions
+2 -2
View File
@@ -119,7 +119,7 @@ int ifname_mangle(const char *s) {
if (!iface)
return log_oom();
ifi = resolve_interface(NULL, iface);
ifi = rtnl_resolve_interface(NULL, iface);
if (ifi < 0) {
if (ifi == -ENODEV && arg_ifindex_permissive) {
log_debug("Interface '%s' not found, but -f specified, ignoring.", iface);
@@ -2018,7 +2018,7 @@ static int verb_status(int argc, char **argv, void *userdata) {
STRV_FOREACH(ifname, argv + 1) {
int ifindex, q;
ifindex = resolve_interface(&rtnl, *ifname);
ifindex = rtnl_resolve_interface(&rtnl, *ifname);
if (ifindex < 0) {
log_warning_errno(ifindex, "Failed to resolve interface \"%s\", ignoring: %m", *ifname);
continue;