Add create_file syscall, CE mkfile command, FatFS formatting fixes
All checks were successful
Build documentation / build-and-deploy (push) Successful in 4m16s

This commit is contained in:
2026-03-01 01:52:09 +01:00
parent eb55a6de21
commit abd85744cc
13 changed files with 133 additions and 18 deletions

View File

@@ -32,7 +32,7 @@ struct vfs_volume {
bool locked;
struct proc_suspension_q sq;
struct {
int (*mount) (struct vfs_volume* volume);
int (*mount) (struct vfs_volume* volume, bool format);
int (*format) (struct vfs_volume* volume);
@@ -46,6 +46,8 @@ struct vfs_volume {
int (*read_dir_entry) (struct vfs_volume* volume, const char* path, struct dir_entry* entry,
size_t entry_num);
int (*create_file) (struct vfs_volume* volume, const char* path);
} driver_ops;
struct device* back_device;
void* udata
@@ -56,7 +58,7 @@ struct vfs_volume_table {
spin_lock_t lock;
};
int vfs_create_volume (const char* key, int fs_type, struct device* back_device);
int vfs_create_volume (const char* key, int fs_type, struct device* back_device, bool format);
int vfs_volume_open (struct proc* proc, const char* volume, struct reschedule_ctx* rctx);
@@ -72,6 +74,8 @@ int vfs_describe (struct proc* proc, const char* volume, const char* path, struc
int vfs_read_dir_entry (struct proc* proc, const char* volume, const char* path,
struct dir_entry* entry, size_t entry_num);
int vfs_create_file (struct proc* proc, const char* volume_name, const char* path);
void vfs_init (void);
void vfs_translate (size_t fs_block, size_t fs_block_count, size_t fs_block_size,