summaryrefslogtreecommitdiff
path: root/src/devices
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2016-01-10 14:48:13 +0100
committerThomas Haller <thaller@redhat.com>2016-01-11 14:05:49 +0100
commit169c5b7a525d3ebf6f203db5a248fd92438b6040 (patch)
tree947bc58a14ec61ef98c65b3b788972c19a41b78c /src/devices
parenteee00a8355108130c680e4df9c3c1eb0979d88ae (diff)
downloadNetworkManager-169c5b7a525d3ebf6f203db5a248fd92438b6040.tar.gz
device: remove unused virtual function NMDevice:realize()
The idea of NMDevice:realize() was to (1) update the device properties (2) fail realization if some critical properties are missing (1) is already done during nm_device_setup_start(). (2) was only implemented by NMDeviceVlan:realize(), but it basically was just checking whether such a platform device exists. Other implementations don't do that either and it opens up for a race when the device gets deleted externally.
Diffstat (limited to 'src/devices')
-rw-r--r--src/devices/nm-device.c6
-rw-r--r--src/devices/nm-device.h21
2 files changed, 0 insertions, 27 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index a7357c5486..9b65afee74 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -1732,12 +1732,6 @@ nm_device_realize (NMDevice *self,
return FALSE;
}
- /* Try to realize the device from existing resources */
- if (NM_DEVICE_GET_CLASS (self)->realize) {
- if (!NM_DEVICE_GET_CLASS (self)->realize (self, plink, error))
- return FALSE;
- }
-
realize_start_setup (self, plink);
return TRUE;
diff --git a/src/devices/nm-device.h b/src/devices/nm-device.h
index edcbb443a1..6b004a48ca 100644
--- a/src/devices/nm-device.h
+++ b/src/devices/nm-device.h
@@ -145,27 +145,6 @@ typedef struct {
void (* link_changed) (NMDevice *self, NMPlatformLink *info);
/**
- * realize():
- * @self: the #NMDevice
- * @plink: the #NMPlatformLink if backed by a kernel netdevice
- * @error: location to store error, or %NULL
- *
- * Realize the device from existing backing resources. No resources
- * should be created as a side-effect of this function. This function
- * should only fail if critical device properties/resources (eg, VLAN ID)
- * fail to be read or initialized, that would cause the device to be
- * unusable. For example, for any properties required to realize the device
- * during create_and_realize(), if reading those properties in realize()
- * should fail, this function should probably return %FALSE and an error.
- *
- * Returns: %TRUE on success, %FALSE if some error ocurred when realizing
- * the device from backing resources
- */
- gboolean (*realize) (NMDevice *self,
- NMPlatformLink *plink,
- GError **error);
-
- /**
* create_and_realize():
* @self: the #NMDevice
* @connection: the #NMConnection being activated