summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/file.h10
-rw-r--r--fs/mount.h13
2 files changed, 12 insertions, 11 deletions
diff --git a/fs/file.h b/fs/file.h
index 5455925..f8445a2 100644
--- a/fs/file.h
+++ b/fs/file.h
@@ -5,14 +5,12 @@
typedef struct
{
+ int(* seek)(int offset, int whence);
- void(* tell)();
- void(* seek)(int offset, int whence);
+ int(* read)(char *buf, int len);
+ int(* wrtie)(char *buf, int len);
- void(* read)(char *buf, int len);
- void(* wrtie)(char *buf, int len);
-
- void(* close)();
+ int(* close)();
int(* stat)(struct stat *buf);
void *data; //opaque
diff --git a/fs/mount.h b/fs/mount.h
index d27195f..beece3c 100644
--- a/fs/mount.h
+++ b/fs/mount.h
@@ -1,14 +1,17 @@
#ifndef MOUNT_H
#define MOUNT_H
-typedef struct
-{
- char *path; // where?
- int (*getdents)(uint32_t file_desciptor, fs_dirent *entries, uint32_t max_count);
- file get
+#define MOUNT_MAX_MOUNTS 10
+typedef struct mount_strutc
+{
+ char path[256]; // where are we mounted
+ int (*getdents)(mount_struct*, uint32_t file_desciptor, fs_dirent *entries, uint32_t max_count);
+ file (*open)ByName(mount_struct*,char *path);
void *data //opaque
}mount;
+mount *mounts_get();
+//
#endif