networkd: simplify and display all devtypes
authorJason A. Donenfeld <Jason@zx2c4.com>
Mon, 29 Jan 2018 20:01:46 +0000 (21:01 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Mon, 29 Jan 2018 20:02:44 +0000 (21:02 +0100)
commitf119082e7a1ccfbf50c30a99819b6e303cdf09a1
tree395464c8d552e1ce58650a58abb83a38166db9b7
parenta18461bc7d446f8e130e9276de4397d00059267f
networkd: simplify and display all devtypes

Every place the kernel actually calls SET_NETDEV_DEVTYPE, it's adding a
piece of information that looks useful and relevant for us to use. So
let's use it when it's there.

The previous matching based on the corresponding ARPHRD didn't really
make much sense. The more sensible logic for getting a textual
representation of the link type is to see if the kernel supplies a
devtype. If it does, great. If not, then we can fall back on the ARPHRD,
as before.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
src/network/networkctl.c