44 if (
fds[i].in_use == 0) {
66fopen(
const char *path,
const char *mode)
126 if (
fwrite(&ch, 1, 1, fh) == 1)
160 if (
fread(&ch, 1, 1, fh) == 1)
170 for (i = 0; i < (
size - 1); i++) {
187 str[
size - 1] =
'\0';
static FILE fds[FOPEN_MAX]
size_t fwrite(const void *buf, size_t size, size_t nmemb, FILE *fh)
int puts(const char *str)
FILE * fopen(const char *path, const char *mode)
char * fgets(char *str, int size, FILE *fh)
size_t fread(void *buf, size_t size, size_t nmemb, FILE *fh)
int fputs(const char *str, FILE *fh)
void _free_file(FILE *fh)
int fputc(int ch, FILE *fh)
int OSRead(uint64_t fd, void *addr, uint64_t off, uint64_t length)
uint64_t OSOpen(const char *path, uint64_t flags)
int OSWrite(uint64_t fd, const void *addr, uint64_t off, uint64_t length)
size_t strlen(const char *str)