Add first C user program

This commit is contained in:
2026-06-11 20:19:24 +03:00
parent b32c12b311
commit 1c935cf154
55 changed files with 365 additions and 276 deletions
+26
View File
@@ -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);