device: fix delay startup complete for unrealized devices

Since commit 6845b9b80a ("device: delay
startup complete until device is initialized in platform", we also wait
for devices that are still initializing platform/UDEV.

Obviously, that only applies to realized devices.

Otherwise, an unrealized device is going to block startup complete.

Fixes: 6845b9b80a
(cherry picked from commit 9ad8010fe0)
This commit is contained in:
Thomas Haller 2017-09-29 17:08:55 +02:00
parent b18ff17d3d
commit 0ba498b17d

View file

@ -12030,7 +12030,8 @@ nm_device_has_pending_action (NMDevice *self)
if (priv->pending_actions)
return TRUE;
if (nm_device_get_unmanaged_flags (self, NM_UNMANAGED_PLATFORM_INIT)) {
if ( nm_device_is_real (self)
&& nm_device_get_unmanaged_flags (self, NM_UNMANAGED_PLATFORM_INIT)) {
/* as long as the platform link is not yet initialized, we have a pending
* action. */
return TRUE;