devfs: use iovec_iterator internally

This commit is contained in:
Matheus
2024-09-21 13:53:39 -03:00
parent 01c883917f
commit e8c2f1fbf3
14 changed files with 149 additions and 97 deletions
+3 -2
View File
@@ -3,6 +3,7 @@
#include <stddef.h>
#include <stdint.h>
#include <kernel/iovec.h>
#define BLOCK_TYPE_DISK 0
#define BLOCK_TYPE_PART 1
@@ -15,8 +16,8 @@ typedef struct {
uintmax_t lbaoffset;
size_t blockcapacity;
size_t blocksize;
int (*write)(void *private, void *buffer, uintmax_t lba, size_t count);
int (*read)(void *private, void *buffer, uintmax_t lba, size_t count);
int (*write)(void *private, iovec_iterator_t *buffer, uintmax_t lba, size_t count);
int (*read)(void *private, iovec_iterator_t *buffer, uintmax_t lba, size_t count);
} blockdesc_t;
void block_register(blockdesc_t *desc, char *name);