diff options
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/fd.h | 16 | ||||
| -rw-r--r-- | fs/file.c | 4 | ||||
| -rw-r--r-- | fs/file.h | 26 | ||||
| -rw-r--r-- | fs/mount.c | 12 | ||||
| -rw-r--r-- | fs/mount.h | 23 |
5 files changed, 16 insertions, 65 deletions
@@ -8,6 +8,22 @@ #include "fifo.h" +/* +typedef struct +{ + int(* seek)(int offset, int whence); + + int(* read)(char *buf, int len); + int(* wrtie)(char *buf, int len); + + int(* close)(); + int(* stat)(void *buf); + + void *data; //opaque + +}file; +*/ + enum FD_TYPE{ FD_TYPE_FIFO_BUFFERED=1, FD_TYPE_EXT2_FILE=2 diff --git a/fs/file.c b/fs/file.c deleted file mode 100644 index 185c3a9..0000000 --- a/fs/file.c +++ /dev/null @@ -1,4 +0,0 @@ -#include "file.h" - - - diff --git a/fs/file.h b/fs/file.h deleted file mode 100644 index 53c96d8..0000000 --- a/fs/file.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef FILE_H -#define FILE_H - -#include <stdint.h> - -#define FILE_MAX_FILES 100; - -typedef struct -{ - int(* seek)(int offset, int whence); - - int(* read)(char *buf, int len); - int(* wrtie)(char *buf, int len); - - int(* close)(); - int(* stat)(void *buf); - - void *data; //opaque - -}file; - - - - - -#endif diff --git a/fs/mount.c b/fs/mount.c deleted file mode 100644 index cb741f9..0000000 --- a/fs/mount.c +++ /dev/null @@ -1,12 +0,0 @@ -#include "mount.h" - -void mount_add(char *path, void *data, - file (*open) (struct mount_struct*,char *path), - int (*getdents)(struct mount_struct*, uint32_t file_desciptor, fs_dirent *entries, uint32_t max_count)) -{ -} - -mount *mounts_get() -{ - return 0; -} diff --git a/fs/mount.h b/fs/mount.h deleted file mode 100644 index a327e2e..0000000 --- a/fs/mount.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef MOUNT_H -#define MOUNT_H - -#define MOUNT_MAX_MOUNTS 10 - -#include <stdint.h> -#include "file.h" -#include "interface/fs.h" - -typedef struct mount_struct -{ - char path[256]; // where are we mounted - int (*getdents) (struct mount_struct*, uint32_t file_desciptor, fs_dirent *entries, uint32_t max_count); - file (*open) (struct mount_struct*,char *path); - void *data; //opaque - -}mount; - -mount *mounts_get(); -void mount_add(char *path, void *data,file (*open)(struct mount_struct*,char *path),int (*getdents)(struct mount_struct*, uint32_t file_desciptor, fs_dirent *entries, uint32_t max_count)); - -// -#endif |
