about summary refs log tree commit diff
path: root/libnm/nm-device.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2021-02-11 18:11:46 +0100
committerMichael Biebl <biebl@debian.org>2021-02-11 18:11:46 +0100
commit80ec1decc49c72efec2a8b87c06245c92c0ab807 (patch)
treee3b229aa94e8dcf0590f2317664176e7b8f7607b /libnm/nm-device.c
parent65f86e8f56267192d42f2b629fc6b0c99fb9cd0c (diff)
New upstream version 1.29.90 upstream/1.29.90
Diffstat (limited to 'libnm/nm-device.c')
-rw-r--r--libnm/nm-device.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/libnm/nm-device.c b/libnm/nm-device.c
index 9e7eb6ba..9cb88dae 100644
--- a/libnm/nm-device.c
+++ b/libnm/nm-device.c
@@ -1,10 +1,10 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 /*
  * Copyright (C) 2007 - 2008 Novell, Inc.
  * Copyright (C) 2007 - 2018 Red Hat, Inc.
  */
 
-#include "nm-default.h"
+#include "libnm/nm-default-libnm.h"
 
 #include "nm-device.h"
 
@@ -1223,8 +1223,11 @@ nm_device_get_type_description(NMDevice *device)
     }
 
     typename = G_OBJECT_TYPE_NAME(device);
-    if (g_str_has_prefix(typename, "NMDevice"))
+    if (g_str_has_prefix(typename, "NMDevice")) {
         typename += 8;
+        if (nm_streq(typename, "Veth"))
+            typename = "Ethernet";
+    }
     priv->type_description = g_ascii_strdown(typename, -1);
 
     return _nml_coerce_property_str_not_empty(priv->type_description);
@@ -2814,6 +2817,10 @@ nm_device_connection_compatible(NMDevice *device, NMConnection *connection, GErr
  * Returns: (transfer full) (element-type NMConnection): an array of
  * #NMConnections that could be activated with the given @device.  The array
  * should be freed with g_ptr_array_unref() when it is no longer required.
+ *
+ * WARNING: the transfer annotation for this function may not work correctly
+ *   with bindings. See https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/305.
+ *   You can filter the list yourself with nm_device_connection_valid().
  **/
 GPtrArray *
 nm_device_filter_connections(NMDevice *device, const GPtrArray *connections)