libnm: add missing device types to get_type_name()
authorThomas Haller <thaller@redhat.com>
Tue, 23 Feb 2016 16:28:53 +0000 (17:28 +0100)
committerThomas Haller <thaller@redhat.com>
Tue, 23 Feb 2016 22:15:37 +0000 (23:15 +0100)
libnm-glib/nm-device.c
libnm/nm-device.c

index 377784b..a16278a 100644 (file)
@@ -1868,9 +1868,21 @@ get_type_name (NMDevice *device)
                return _("VLAN");
        case NM_DEVICE_TYPE_ADSL:
                return _("ADSL");
-       default:
-               return _("Unknown");
+       case NM_DEVICE_TYPE_MACVLAN:
+               return _("MACVLAN");
+       case NM_DEVICE_TYPE_VXLAN:
+               return _("VXLAN");
+       case NM_DEVICE_TYPE_IP_TUNNEL:
+               return _("IPTunnel");
+       case NM_DEVICE_TYPE_TUN:
+               return _("Tun");
+       case NM_DEVICE_TYPE_GENERIC:
+       case NM_DEVICE_TYPE_UNUSED1:
+       case NM_DEVICE_TYPE_UNUSED2:
+       case NM_DEVICE_TYPE_UNKNOWN:
+               break;
        }
+       return _("Unknown");
 }
 
 static char *
index 5545e8b..80ae55e 100644 (file)
@@ -1819,9 +1819,21 @@ get_type_name (NMDevice *device)
                return _("VLAN");
        case NM_DEVICE_TYPE_ADSL:
                return _("ADSL");
-       default:
-               return _("Unknown");
+       case NM_DEVICE_TYPE_MACVLAN:
+               return _("MACVLAN");
+       case NM_DEVICE_TYPE_VXLAN:
+               return _("VXLAN");
+       case NM_DEVICE_TYPE_IP_TUNNEL:
+               return _("IPTunnel");
+       case NM_DEVICE_TYPE_TUN:
+               return _("Tun");
+       case NM_DEVICE_TYPE_GENERIC:
+       case NM_DEVICE_TYPE_UNUSED1:
+       case NM_DEVICE_TYPE_UNUSED2:
+       case NM_DEVICE_TYPE_UNKNOWN:
+               break;
        }
+       return _("Unknown");
 }
 
 static char *