Files
Espresso/include/fs/ekfs.h

38 lines
657 B
C
Raw Normal View History

2026-03-20 16:57:08 -05:00
//#ifndef _ESPRESSO_KERNEL_FS_H
#if 0
#define _ESPRESSO_KERNEL_FS_H
#include <types.h>
#define EKFS_FILENAME_MAX_LEN 64
enum {
EKFS_E_FILETOOSMALL = -16;
};
struct ekfs_inode {
char i_name[EKFS_FILENAME_MAX_LEN];
uint64_t i_start; /* LBA48 */
size_t i_len; /* rounded up to the nearest multiple of 512 */
} __attribute__((packed));
struct ekfs_ops {
int (*read)(struct ekfs_file*, void*, size_t);
int (*write)(struct ekfs_file*, void*, size_t);
};
struct ekfs_file {
struct ekfs_inode* f_inode;
size_t f_offset;
size_t f_refcount;
struct ekfs_ops f_ops;
};
int ekfs_read(struct ekfs_file* __f, void* __b, size_t __l);
#endif