Fixed disk reading

This commit is contained in:
Jozef Nagy 2025-01-29 20:33:45 +01:00
parent fae958815f
commit 36ae3ec0b7
Signed by untrusted user who does not match committer: crz
GPG key ID: 459A4811CEAC7068
6 changed files with 20 additions and 13 deletions

View file

@ -25,7 +25,7 @@
#include <stddef.h>
struct vfs_filesystem {
size_t (*read)(char *, char *, struct vfs_drive *, void *);
size_t (*read)(char *, char **, struct vfs_drive *, void *);
uint8_t (*write)(char *, char *, size_t, struct vfs_drive *, void *);
void *fsdata;
@ -40,7 +40,7 @@ int vfs_init(char *root_mountpoint);
/* This function allocates `buf`. Passing a non-NULL value will result in an error. */
/* NOTE: Remember to free the allocated memory afterwards! */
size_t vfs_read(char *filename, char *buf);
size_t vfs_read(char *filename, char **buf);
int vfs_write(char *filename, char *buf, size_t len);
/* Every platform will define this on its own */