rulimine/stage2/fs/file.h

24 lines
525 B
C
Raw Normal View History

2020-04-14 06:20:55 +03:00
#ifndef __FS__FILE_H__
#define __FS__FILE_H__
#include <stdint.h>
2020-11-01 23:25:35 +03:00
#include <stdbool.h>
struct part;
struct guid;
bool fs_get_guid(struct guid *guid, struct part *part);
2020-04-14 06:20:55 +03:00
struct file_handle {
int disk;
int partition;
void *fd;
int (*read)(void *fd, void *buf, uint64_t loc, uint64_t count);
uint64_t size;
};
int fopen(struct file_handle *ret, int disk, int partition, const char *filename);
int fread(struct file_handle *fd, void *buf, uint64_t loc, uint64_t count);
#endif