mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-06 13:17:44 +03:00
stub: Do not assume having DeviceHandle
This commit is contained in:
parent
80bfc3b901
commit
5204355861
@ -330,6 +330,12 @@ EFI_STATUS pack_cpio(
|
||||
assert(ret_buffer);
|
||||
assert(ret_buffer_size);
|
||||
|
||||
if (!loaded_image->DeviceHandle) {
|
||||
*ret_buffer = NULL;
|
||||
*ret_buffer_size = 0;
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
root = LibOpenRoot(loaded_image->DeviceHandle);
|
||||
if (!root)
|
||||
return log_error_status_stall(EFI_LOAD_ERROR, L"Unable to open root directory.");
|
||||
|
@ -10,7 +10,8 @@ EFI_STATUS disk_get_part_uuid(EFI_HANDLE *handle, CHAR16 uuid[static 37]) {
|
||||
EFI_DEVICE_PATH *device_path;
|
||||
_cleanup_freepool_ EFI_DEVICE_PATH *paths = NULL;
|
||||
|
||||
assert(handle);
|
||||
if (!handle)
|
||||
return EFI_NOT_FOUND;
|
||||
|
||||
/* export the device path this image is started from */
|
||||
device_path = DevicePathFromHandle(handle);
|
||||
|
Loading…
Reference in New Issue
Block a user