Add first C user program
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define FILENAME_SIZE_LIMIT 255
|
||||
|
||||
typedef struct fs_node {
|
||||
char name[FILENAME_SIZE_LIMIT + 1];
|
||||
uint32_t size;
|
||||
uint8_t is_dir;
|
||||
uint8_t type;
|
||||
} fs_node_t;
|
||||
|
||||
fs_node_t *fs_mount();
|
||||
|
||||
fs_node_t *fs_open_by(const fs_node_t *directory, const char *name);
|
||||
|
||||
fs_node_t *fs_open_at(const fs_node_t *directory, uint64_t index);
|
||||
|
||||
fs_node_t *fs_open_again(const fs_node_t *source);
|
||||
|
||||
void fs_read(const fs_node_t *file, uint64_t offset, uint64_t size, void *to);
|
||||
|
||||
void fs_close(fs_node_t *node);
|
||||
|
||||
void fs_unmount(fs_node_t *fs);
|
||||
Reference in New Issue
Block a user