uefi: check for free space after cleaning up ESP

In a very small ESP situation it's possible that the amount of free
space is insufficient until it's actually been cleaned.

Fixes: #2179
This commit is contained in:
Mario Limonciello 2020-06-15 10:05:36 -05:00 committed by Mario Limonciello
parent e261bb6fa0
commit 2caea54202

View File

@ -515,10 +515,10 @@ fu_uefi_device_prepare (FuDevice *device,
/* sanity checks */
if (!fu_uefi_device_is_esp_mounted (device, error))
return FALSE;
if (!fu_uefi_device_check_esp_free (device, error))
return FALSE;
if (!fu_uefi_device_cleanup_esp (device, error))
return FALSE;
if (!fu_uefi_device_check_esp_free (device, error))
return FALSE;
return TRUE;
}