mirror of
https://git.proxmox.com/git/fwupd
synced 2025-06-06 07:46:22 +00:00
trivial: Allow plugins to use WAIT_FOR_REPLUG in prepare and cleanup
This commit is contained in:
parent
b05d39adff
commit
802bb313c6
@ -1839,6 +1839,14 @@ fu_engine_update_prepare (FuEngine *self,
|
|||||||
if (!fu_plugin_runner_update_prepare (plugin_tmp, flags, device, error))
|
if (!fu_plugin_runner_update_prepare (plugin_tmp, flags, device, error))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* wait for device to disconnect and reconnect */
|
||||||
|
if (fu_device_has_flag (device, FWUPD_DEVICE_FLAG_WAIT_FOR_REPLUG)) {
|
||||||
|
if (!fu_device_list_wait_for_replug (self->device_list, device, error)) {
|
||||||
|
g_prefix_error (error, "failed to wait for prepare replug: ");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1860,6 +1868,14 @@ fu_engine_update_cleanup (FuEngine *self,
|
|||||||
if (!fu_plugin_runner_update_cleanup (plugin_tmp, flags, device, error))
|
if (!fu_plugin_runner_update_cleanup (plugin_tmp, flags, device, error))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* wait for device to disconnect and reconnect */
|
||||||
|
if (fu_device_has_flag (device, FWUPD_DEVICE_FLAG_WAIT_FOR_REPLUG)) {
|
||||||
|
if (!fu_device_list_wait_for_replug (self->device_list, device, error)) {
|
||||||
|
g_prefix_error (error, "failed to wait for cleanup replug: ");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user