mirror of
https://github.com/limine-bootloader/limine
synced 2025-01-19 11:09:26 +03:00
commit
23f2c7dbac
@ -504,14 +504,6 @@ fail:
|
||||
break;
|
||||
}
|
||||
|
||||
EFI_GUID disk_io_guid = DISK_IO_PROTOCOL;
|
||||
EFI_DISK_IO *disk_io = NULL;
|
||||
|
||||
status = gBS->HandleProtocol(handles[i], &disk_io_guid, (void **)&disk_io);
|
||||
if (status) {
|
||||
continue;
|
||||
}
|
||||
|
||||
EFI_BLOCK_IO *drive = NULL;
|
||||
|
||||
status = gBS->HandleProtocol(handles[i], &block_io_guid, (void **)&drive);
|
||||
@ -522,13 +514,12 @@ fail:
|
||||
if (drive->Media->LogicalPartition)
|
||||
continue;
|
||||
|
||||
uint64_t orig;
|
||||
status = disk_io->ReadDisk(disk_io, drive->Media->MediaId, 0, sizeof(uint64_t), &orig);
|
||||
status = drive->ReadBlocks(drive, drive->Media->MediaId, 0, 4096, unique_sector_pool);
|
||||
if (status) {
|
||||
continue;
|
||||
}
|
||||
|
||||
status = disk_io->WriteDisk(disk_io, drive->Media->MediaId, 0, sizeof(uint64_t), &orig);
|
||||
status = drive->WriteBlocks(drive, drive->Media->MediaId, 0, 4096, unique_sector_pool);
|
||||
|
||||
struct volume *block = ext_mem_alloc(sizeof(struct volume));
|
||||
|
||||
|
@ -106,7 +106,7 @@ could_not_match:
|
||||
(void **)&loaded_image);
|
||||
|
||||
if (status) {
|
||||
panic(false, "HandleProtocol failure (%x)", status);
|
||||
goto could_not_match;
|
||||
}
|
||||
|
||||
boot_volume = disk_volume_from_efi_handle(loaded_image->DeviceHandle);
|
||||
|
@ -267,7 +267,11 @@ int pit_sleep_and_quit_on_keypress(int seconds) {
|
||||
|
||||
if (gBS->HandleProtocol(gST->ConsoleInHandle, &exproto_guid, (void **)&exproto) != EFI_SUCCESS) {
|
||||
if (gBS->HandleProtocol(gST->ConsoleInHandle, &sproto_guid, (void **)&sproto) != EFI_SUCCESS) {
|
||||
panic(false, "Your input device doesn't have an input protocol!");
|
||||
if (gST->ConIn != NULL) {
|
||||
sproto = gST->ConIn;
|
||||
} else {
|
||||
panic(false, "Your input device doesn't have an input protocol!");
|
||||
}
|
||||
}
|
||||
|
||||
events[0] = sproto->WaitForKey;
|
||||
|
Loading…
Reference in New Issue
Block a user