Implement an ATA driver, Add vfsmount/vfsunmount syscalls
This commit is contained in:
30
kernel/storedev/atasd.h
Normal file
30
kernel/storedev/atasd.h
Normal file
@ -0,0 +1,30 @@
|
||||
#ifndef STOREDEV_ATASD_H_
|
||||
#define STOREDEV_ATASD_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#define STOREDEV_ATASD_SECTORSIZE 512
|
||||
|
||||
struct StoreDev;
|
||||
|
||||
typedef struct {
|
||||
int devno;
|
||||
size_t capacity;
|
||||
} AtaSdInitExtra;
|
||||
|
||||
typedef struct {
|
||||
int devno;
|
||||
size_t capacity;
|
||||
} AtaSd;
|
||||
|
||||
int32_t atasd_init(struct StoreDev *sd, void *extra);
|
||||
int32_t atasd_read(struct StoreDev *sd, uint8_t *const buffer, ptrdiff_t sector, ptrdiff_t off, size_t size);
|
||||
int32_t atasd_write(struct StoreDev *sd, const uint8_t *const buffer, ptrdiff_t sector, ptrdiff_t off, size_t size);
|
||||
int32_t atasd_cleanup(struct StoreDev *sd);
|
||||
size_t atasd_capacity(struct StoreDev *sd);
|
||||
|
||||
void ata_probe(void);
|
||||
|
||||
#endif // STOREDEV_ATASD_H_
|
||||
Reference in New Issue
Block a user