summary refs log tree commit diff
path: root/src/devices/nm-device-private.h
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2018-09-23 10:10:27 +0200
committerMichael Biebl <biebl@debian.org>2018-09-23 10:10:27 +0200
commite126f3e804c35480c4f075777430419d6ece23da (patch)
tree5d5821ebcda8cd6ac34d2483bb3354910e508930 /src/devices/nm-device-private.h
parentc240974325c552cad177c457d6ff04e381fd77a3 (diff)
New upstream version 1.12.4 upstream/1.12.4
Diffstat (limited to 'src/devices/nm-device-private.h')
-rw-r--r--src/devices/nm-device-private.h27
1 files changed, 9 insertions, 18 deletions
diff --git a/src/devices/nm-device-private.h b/src/devices/nm-device-private.h
index 66c715de..ba28e9e4 100644
--- a/src/devices/nm-device-private.h
+++ b/src/devices/nm-device-private.h
@@ -130,21 +130,12 @@ void nm_device_commit_mtu (NMDevice *self);
 
 /*****************************************************************************/
 
-#define NM_DEVICE_DEFINE_LINK_TYPES(...) \
-	((NM_NARG (__VA_ARGS__) == 0) \
-	  ? NULL \
-	  : ({ \
-	      static const struct { \
-	          const NMLinkType types[NM_NARG (__VA_ARGS__)]; \
-	          const NMLinkType sentinel; \
-	      } _link_types = { \
-	          .types = { __VA_ARGS__ }, \
-	          .sentinel = NM_LINK_TYPE_NONE, \
-	      }; \
-	      \
-	      _link_types.types; \
-	    })\
-	)
+#define NM_DEVICE_CLASS_DECLARE_TYPES(klass, conn_type, ...) \
+	NM_DEVICE_CLASS (klass)->connection_type = conn_type; \
+	{ \
+		static const NMLinkType link_types[] = { __VA_ARGS__, NM_LINK_TYPE_NONE }; \
+		NM_DEVICE_CLASS (klass)->link_types = link_types; \
+	}
 
 gboolean _nm_device_hash_check_invalid_keys (GHashTable *hash, const char *setting_name,
                                              GError **error, const char **whitelist);
@@ -152,8 +143,8 @@ gboolean _nm_device_hash_check_invalid_keys (GHashTable *hash, const char *setti
 	_nm_device_hash_check_invalid_keys (hash, setting_name, error, ((const char *[]) { __VA_ARGS__, NULL }))
 
 gboolean nm_device_match_parent (NMDevice *device, const char *parent);
-gboolean nm_device_match_parent_hwaddr (NMDevice *device,
-                                        NMConnection *connection,
-                                        gboolean fail_if_no_hwaddr);
+gboolean nm_device_match_hwaddr (NMDevice *device,
+                                 NMConnection *connection,
+                                 gboolean fail_if_no_hwaddr);
 
 #endif /* NM_DEVICE_PRIVATE_H */