summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2015-11-26 15:00:27 +0100
committerBeniamino Galvani <bgalvani@redhat.com>2015-12-09 16:36:46 +0100
commit228d2dab822e05fd118ac2a532a32ba7ef0ab29c (patch)
tree89a9e43f28f6e81dc779c6462f7df1e6604197e7
parentdc0676330b8b34d54749b9d38c59ba8f6da35fb8 (diff)
downloadNetworkManager-228d2dab822e05fd118ac2a532a32ba7ef0ab29c.tar.gz
libnm-glib: consider unknown devices as generic ones
After commit 8ca6e412c1c0214603503521b6461e47b13be373, libnm-glib is able to instantiate unknown devices as dummy objects without creating a D-Bus proxy for them. Enable this behavior for every new unknown device type.
-rw-r--r--libnm-glib/nm-device.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libnm-glib/nm-device.c b/libnm-glib/nm-device.c
index ade17d579e..b1f8cfb203 100644
--- a/libnm-glib/nm-device.c
+++ b/libnm-glib/nm-device.c
@@ -327,8 +327,8 @@ _nm_device_gtype_from_dtype (NMDeviceType dtype)
case NM_DEVICE_TYPE_IP_TUNNEL:
return NM_TYPE_DEVICE_GENERIC;
default:
- g_warning ("Unknown device type %d", dtype);
- return G_TYPE_INVALID;
+ /* Fall back to NMDeviceGeneric for unknown devices */
+ return NM_TYPE_DEVICE_GENERIC;
}
}