From: Zbigniew Jędrzejewski-Szmek Date: Wed, 25 Sep 2019 10:14:07 +0000 (+0200) Subject: basic/arphrd: stop discriminating against NETROM and CISCO X-Git-Tag: v244-rc1~257^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F13649%2Fhead;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/basic/arphrd-to-name.awk b/src/basic/arphrd-to-name.awk index 4600dbf28e9..db1c739abb4 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 3010ca6b452..d7352b54e07 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);