checkpoint: skip unrealized devices in nm_checkpoint_manager_create()

We already do it for the case where no paths are provided.
This commit is contained in:
Thomas Haller 2018-03-27 16:39:57 +02:00
parent 6d6b389086
commit daf3d5cb53

View file

@ -195,6 +195,11 @@ nm_checkpoint_manager_create (NMCheckpointManager *self,
"device %s does not exist", *dev_paths);
return NULL;
}
if (!nm_device_is_real (device)) {
g_set_error (error, NM_MANAGER_ERROR, NM_MANAGER_ERROR_UNKNOWN_DEVICE,
"device %s is not realized", *dev_paths);
return NULL;
}
g_ptr_array_add (devices, device);
}