summary refs log tree commit diff
path: root/libnm-core/nm-setting-macvlan.c
diff options
context:
space:
mode:
Diffstat (limited to 'libnm-core/nm-setting-macvlan.c')
-rw-r--r--libnm-core/nm-setting-macvlan.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/libnm-core/nm-setting-macvlan.c b/libnm-core/nm-setting-macvlan.c
index 1fc16116..6fea8b0d 100644
--- a/libnm-core/nm-setting-macvlan.c
+++ b/libnm-core/nm-setting-macvlan.c
@@ -39,7 +39,9 @@
  * necessary for connection to macvlan interfaces.
  **/
 
-G_DEFINE_TYPE (NMSettingMacvlan, nm_setting_macvlan, NM_TYPE_SETTING)
+G_DEFINE_TYPE_WITH_CODE (NMSettingMacvlan, nm_setting_macvlan, NM_TYPE_SETTING,
+                         _nm_register_setting (MACVLAN, NM_SETTING_PRIORITY_HW_BASE))
+NM_SETTING_REGISTER_TYPE (NM_TYPE_SETTING_MACVLAN)
 
 #define NM_SETTING_MACVLAN_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_SETTING_MACVLAN, NMSettingMacvlanPrivate))
 
@@ -258,18 +260,20 @@ finalize (GObject *object)
 }
 
 static void
-nm_setting_macvlan_class_init (NMSettingMacvlanClass *klass)
+nm_setting_macvlan_class_init (NMSettingMacvlanClass *setting_class)
 {
-	GObjectClass *object_class = G_OBJECT_CLASS (klass);
-	NMSettingClass *setting_class = NM_SETTING_CLASS (klass);
+	GObjectClass *object_class = G_OBJECT_CLASS (setting_class);
+	NMSettingClass *parent_class = NM_SETTING_CLASS (setting_class);
 
-	g_type_class_add_private (klass, sizeof (NMSettingMacvlanPrivate));
+	g_type_class_add_private (setting_class, sizeof (NMSettingMacvlanPrivate));
 
+	/* virtual methods */
 	object_class->set_property = set_property;
 	object_class->get_property = get_property;
 	object_class->finalize     = finalize;
+	parent_class->verify       = verify;
 
-	setting_class->verify = verify;
+	/* Properties */
 
 	/**
 	 * NMSettingMacvlan:parent:
@@ -338,6 +342,4 @@ nm_setting_macvlan_class_init (NMSettingMacvlanClass *klass)
 		                       G_PARAM_CONSTRUCT |
 		                       NM_SETTING_PARAM_INFERRABLE |
 		                       G_PARAM_STATIC_STRINGS));
-
-	_nm_setting_class_commit (setting_class, NM_META_SETTING_TYPE_MACVLAN);
 }