2020-01-23 03:48:35 +03:00
|
|
|
#ifndef __DRIVERS__DISK_H__
|
|
|
|
#define __DRIVERS__DISK_H__
|
2019-06-02 00:34:24 +03:00
|
|
|
|
2019-06-02 12:18:10 +03:00
|
|
|
#include <stdint.h>
|
2021-03-03 22:53:26 +03:00
|
|
|
#include <stddef.h>
|
|
|
|
#include <stdbool.h>
|
2021-03-02 12:23:43 +03:00
|
|
|
#include <lib/part.h>
|
2019-06-02 12:18:10 +03:00
|
|
|
|
2021-07-15 11:03:47 +03:00
|
|
|
#if uefi == 1
|
2021-03-04 03:42:25 +03:00
|
|
|
|
|
|
|
#include <efi.h>
|
|
|
|
|
2021-09-01 21:22:28 +03:00
|
|
|
struct volume *disk_volume_from_efi_handle(EFI_HANDLE efi_handle);
|
2021-03-04 03:42:25 +03:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2022-01-03 20:58:37 +03:00
|
|
|
enum {
|
|
|
|
DISK_SUCCESS,
|
|
|
|
DISK_NO_MEDIA,
|
|
|
|
DISK_FAILURE
|
|
|
|
};
|
|
|
|
|
2021-03-04 11:15:10 +03:00
|
|
|
void disk_create_index(void);
|
2022-01-03 20:58:37 +03:00
|
|
|
int disk_read_sectors(struct volume *volume, void *buf, uint64_t block, size_t count);
|
2019-06-02 00:34:24 +03:00
|
|
|
|
|
|
|
#endif
|