A toy operating system written in C.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
freywaros/src/kernel/fat16.h

26 lines
679 B

#pragma once
#include "src/kernel/fs.h"
#include "src/kernel/stream.h"
#define FAT16 1
fs_node_t *fat16_mount();
fs_node_t *fat16_open_by(const fs_node_t *directory, const char *name);
fs_node_t *fat16_open_at(const fs_node_t *directory, uint64_t index);
fs_node_t *fat16_open_again(const fs_node_t *source);
stream_t *fat16_open_stream(const fs_node_t *source);
uint64_t fat16_read(const fs_node_t *file, uint32_t offset, uint32_t bytes, void *to);
uint64_t fat16_write(fs_node_t *file, uint32_t offset, const void *from, uint32_t bytes);
uint64_t fat16_truncate(fs_node_t *file, uint32_t size);
void fat16_close(fs_node_t *node);
void fat16_unmount(fs_node_t *fs);