Remove conversions between VfsStat struct and IoctlStat struct
This commit is contained in:
@ -50,7 +50,7 @@ void vfs_init_littlefs(VfsMountPoint *mp, bool format) {
|
||||
mp->fetchdirent = &littlefs_fetchdirent;
|
||||
}
|
||||
|
||||
int32_t vfs_stat(char *mountpoint, const char *path, VfsStat *stat) {
|
||||
int32_t vfs_stat(char *mountpoint, const char *path, IoctlStat *stat) {
|
||||
VfsMountPoint *mp = NULL;
|
||||
|
||||
spinlock_acquire(&VFS_TABLE.spinlock);
|
||||
|
@ -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_
|
||||
|
Reference in New Issue
Block a user