netlink: move resolve_ifname() or friends to netlink-util.[ch]
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user