diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-01-11 11:21:01 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-01-12 11:24:35 +0100 |
commit | d308bb99d20b45fed1923ed6b893a59dbac02eca (patch) | |
tree | 085a0d8b68470695146ee584bd60b402c34cd4d8 /src/basic/parse-util.c | |
parent | util-lib: add function to resolve "alternative" names (diff) | |
download | systemd-d308bb99d20b45fed1923ed6b893a59dbac02eca.tar.xz systemd-d308bb99d20b45fed1923ed6b893a59dbac02eca.zip |
Resolve alternative ifnames wherever we would resolve an interface name
To keep the names manageable, "ifname_or_ifindex" is replaced by "interface".
Diffstat (limited to 'src/basic/parse-util.c')
-rw-r--r-- | src/basic/parse-util.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c index d3140cc1a4..b644c4a4d6 100644 --- a/src/basic/parse-util.c +++ b/src/basic/parse-util.c @@ -93,23 +93,6 @@ int parse_ifindex(const char *s) { return ifi; } -int parse_ifindex_or_ifname(const char *s) { - int r; - - assert(s); - - r = parse_ifindex(s); - if (r > 0) - return r; - assert(r < 0); - - r = (int) if_nametoindex(s); - if (r <= 0) - return -errno; - - return r; -} - int parse_mtu(int family, const char *s, uint32_t *ret) { uint64_t u; size_t m; |