summaryrefslogtreecommitdiffstats
path: root/src/basic/parse-util.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-01-11 11:21:01 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-01-12 11:24:35 +0100
commitd308bb99d20b45fed1923ed6b893a59dbac02eca (patch)
tree085a0d8b68470695146ee584bd60b402c34cd4d8 /src/basic/parse-util.c
parentutil-lib: add function to resolve "alternative" names (diff)
downloadsystemd-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.c17
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;