diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-09-25 12:14:07 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-09-25 12:17:51 +0200 |
commit | 35bdba21151798c8204661726c21ae4a49e4662b (patch) | |
tree | 23017b6d68157a93d6702f3b676d698163e876c9 | |
parent | 7e833f301eeca5114be3315ec4f4385cf34977af (diff) | |
download | systemd-35bdba21151798c8204661726c21ae4a49e4662b.tar.gz |
basic/arphrd: stop discriminating against NETROM and CISCO
ARPHRD_NETROM was excluded, most likely just because it is protocol No. 0,
and ARPHRD_CISCO was reported under its alias name "HDLC". Let's just
allow defined aliases under the main name.
-rw-r--r-- | src/basic/arphrd-to-name.awk | 2 | ||||
-rw-r--r-- | src/test/test-arphrd-list.c | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/src/basic/arphrd-to-name.awk b/src/basic/arphrd-to-name.awk index 4600dbf28e..db1c739abb 100644 --- a/src/basic/arphrd-to-name.awk +++ b/src/basic/arphrd-to-name.awk @@ -2,7 +2,7 @@ BEGIN{ print "const char *arphrd_to_name(int id) {" print " switch(id) {" } -!/CISCO|NETROM/ { +!/^HDLC$/ { printf " case ARPHRD_%s: return \"%s\";\n", $1, $1 } END{ diff --git a/src/test/test-arphrd-list.c b/src/test/test-arphrd-list.c index 3010ca6b45..d7352b54e0 100644 --- a/src/test/test-arphrd-list.c +++ b/src/test/test-arphrd-list.c @@ -22,7 +22,6 @@ int main(int argc, const char *argv[]) { } assert_se(arphrd_to_name(ARPHRD_VOID + 1) == NULL); - assert_se(arphrd_to_name(0) == NULL); assert_se(arphrd_from_name("huddlduddl") == -EINVAL); assert_se(arphrd_from_name("") == -EINVAL); |