libnm: add comment and assertions for handling gendata based setting in init_from_dbus()

This commit is contained in:
Thomas Haller 2020-05-11 18:48:17 +02:00
parent 0d7d2425c4
commit 755c3af915
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -874,6 +874,17 @@ init_from_dbus (NMSetting *setting,
}
_nm_setting_gendata_notify (setting, TRUE);
/* Currently, only NMSettingEthtool supports gendata based options, and
* that one has no other properties (except "name"). That means, we
* consumed all options above.
*
* In the future it may be interesting to have settings that are both
* based on gendata and regular properties. In that case, we would need
* to handle this case differently. */
nm_assert (nm_streq (G_OBJECT_TYPE_NAME (setting), "NMSettingEthtool"));
nm_assert (sett_info->property_infos_len == 1);
return TRUE;
}