Remove conversions between VfsStat struct and IoctlStat struct

This commit is contained in:
2025-10-03 19:55:14 +02:00
parent 443cf0e4ff
commit c30d2d2ea6
6 changed files with 11 additions and 28 deletions

View File

@ -20,11 +20,6 @@ static const char *vfs_strings[] = {
"Little FS",
};
enum {
VFS_TYPE_DIR = 0,
VFS_TYPE_FILE = 1,
};
enum {
VFS_FLAG_READ = 1<<0,
VFS_FLAG_WRITE = 1<<1,
@ -33,11 +28,6 @@ enum {
#define VFS_PATH_MAX 1024
typedef struct VfsStat {
size_t size;
int32_t type;
} VfsStat;
typedef struct VfsObj {
SpinLock spinlock;
void *extra;
@ -58,7 +48,7 @@ typedef struct VfsMountPoint {
VfsObj *(*open)(struct VfsMountPoint *vmp, const char *path, uint32_t flags);
int32_t (*cleanup)(struct VfsMountPoint *vmp);
int32_t (*stat)(struct VfsMountPoint *vmp, const char *path, struct VfsStat *statbuf);
int32_t (*stat)(struct VfsMountPoint *vmp, const char *path, IoctlStat *statbuf);
int32_t (*fetchdirent)(struct VfsMountPoint *vmp, const char *path, IoctlDirent *direntbuf, size_t idx);
union {
@ -79,7 +69,7 @@ int32_t vfs_unmount(char *mountpoint);
int32_t vfs_mount(char *mountpoint, int32_t fstype, StoreDev *backingsd, bool format);
void vfs_close(VfsObj *vobj);
VfsObj *vfs_open(char *mountpoint, const char *path, uint32_t flags);
int32_t vfs_stat(char *mountpoint, const char *path, VfsStat *stat);
int32_t vfs_stat(char *mountpoint, const char *path, IoctlStat *stat);
int32_t vfs_fetchdirent(char *mountpoint, const char *path, IoctlDirent *direntbuf, size_t idx);
#endif // VFS_VFS_H_