Systemd/src/basic/arphrd-to-name.awk
Zbigniew Jędrzejewski-Szmek 35bdba2115 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.
2019-09-25 12:17:51 +02:00

13 lines
276 B
Awk

BEGIN{
print "const char *arphrd_to_name(int id) {"
print " switch(id) {"
}
!/^HDLC$/ {
printf " case ARPHRD_%s: return \"%s\";\n", $1, $1
}
END{
print " default: return NULL;"
print " }"
print "}"
}