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.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2019-09-25 12:14:07 +02:00
parent 7e833f301e
commit 35bdba2115
2 changed files with 1 additions and 2 deletions

View File

@ -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{

View File

@ -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);