mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-03-11 16:30:34 +01:00
device: make UDI property construct-only
(cherry picked from commit e216d5eac0)
This commit is contained in:
parent
4ae14d3677
commit
c3b180198f
1 changed files with 3 additions and 6 deletions
|
|
@ -13893,14 +13893,11 @@ set_property (GObject *object, guint prop_id,
|
|||
|
||||
switch (prop_id) {
|
||||
case PROP_UDI:
|
||||
if (g_value_get_string (value)) {
|
||||
g_free (priv->udi);
|
||||
priv->udi = g_value_dup_string (value);
|
||||
}
|
||||
/* construct-only */
|
||||
priv->udi = g_value_dup_string (value);
|
||||
break;
|
||||
case PROP_IFACE:
|
||||
/* construct-only */
|
||||
g_return_if_fail (!priv->iface);
|
||||
priv->iface = g_value_dup_string (value);
|
||||
break;
|
||||
case PROP_DRIVER:
|
||||
|
|
@ -14211,7 +14208,7 @@ nm_device_class_init (NMDeviceClass *klass)
|
|||
obj_properties[PROP_UDI] =
|
||||
g_param_spec_string (NM_DEVICE_UDI, "", "",
|
||||
NULL,
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT |
|
||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
|
||||
G_PARAM_STATIC_STRINGS);
|
||||
obj_properties[PROP_IFACE] =
|
||||
g_param_spec_string (NM_DEVICE_IFACE, "", "",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue