fat_io_lib finally works, implement virtual partition devices, manage devices via string keys
All checks were successful
Build documentation / build-and-deploy (push) Successful in 3m35s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 3m35s
This commit is contained in:
41
kernel/device/partdrv.h
Normal file
41
kernel/device/partdrv.h
Normal file
@@ -0,0 +1,41 @@
|
||||
#ifndef _KERNEL_DEVICE_PARTDRV_H
|
||||
#define _KERNEL_DEVICE_PARTDRV_H
|
||||
|
||||
#include <libk/std.h>
|
||||
#include <proc/proc.h>
|
||||
#include <proc/reschedule.h>
|
||||
|
||||
struct device;
|
||||
|
||||
struct partdrv_init {
|
||||
struct device* super;
|
||||
size_t start_sector;
|
||||
size_t total_size;
|
||||
};
|
||||
|
||||
struct partdrv {
|
||||
struct device* super;
|
||||
size_t start_sector;
|
||||
size_t total_size;
|
||||
};
|
||||
|
||||
bool partdrv_init (struct device* device, void* arg);
|
||||
|
||||
void partdrv_fini (struct device* device);
|
||||
|
||||
int partdrv_read (struct device* device, struct proc* proc, struct reschedule_ctx* rctx, void* a1,
|
||||
void* a2, void* a3, void* a4);
|
||||
|
||||
int partdrv_write (struct device* device, struct proc* proc, struct reschedule_ctx* rctx, void* a1,
|
||||
void* a2, void* a3, void* a4);
|
||||
|
||||
int partdrv_get_device_type (struct device* device, struct proc* proc, struct reschedule_ctx* rctx,
|
||||
void* a1, void* a2, void* a3, void* a4);
|
||||
|
||||
int partdrv_get_sector_size (struct device* device, struct proc* proc, struct reschedule_ctx* rctx,
|
||||
void* a1, void* a2, void* a3, void* a4);
|
||||
|
||||
int partdrv_get_size (struct device* device, struct proc* proc, struct reschedule_ctx* rctx,
|
||||
void* a1, void* a2, void* a3, void* a4);
|
||||
|
||||
#endif // _KERNEL_DEVICE_PARTDRV_H
|
||||
Reference in New Issue
Block a user