mirror of
https://git.proxmox.com/git/fwupd
synced 2025-08-04 20:27:32 +00:00
libdfu: Correctly implement auto-boot in dfu_device_download()
This commit is contained in:
parent
dc3ddc18d3
commit
b5936f9eef
@ -822,6 +822,13 @@ dfu_device_download (DfuDevice *device,
|
||||
g_debug ("booting to runtime to set auto-boot");
|
||||
if (!dfu_device_wait_for_replug (device, 2000, cancellable, error))
|
||||
return FALSE;
|
||||
target_default = dfu_device_get_target_default (device, error);
|
||||
if (target_default == NULL)
|
||||
return FALSE;
|
||||
if (!dfu_target_open (target_default,
|
||||
DFU_TARGET_OPEN_FLAG_NONE,
|
||||
NULL, error))
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* auto-close */
|
||||
|
@ -1088,6 +1088,7 @@ dfu_tool_download (DfuToolPrivate *priv, gchar **values, GError **error)
|
||||
|
||||
/* optional reset */
|
||||
if (priv->reset) {
|
||||
flags |= DFU_TARGET_TRANSFER_FLAG_DETACH;
|
||||
flags |= DFU_TARGET_TRANSFER_FLAG_HOST_RESET;
|
||||
flags |= DFU_TARGET_TRANSFER_FLAG_BOOT_RUNTIME;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user