BarryServer : Git

All the code for all my projects
// BarryServer : Git / Nucleus / commit / 015db5ab00d4752727512ef7b91a3809f6853469 / include / nucleus / vfs.h

// Related

Nucleus

Barry File object 015db5a (3 years, 3 months ago)
diff --git a/include/nucleus/vfs.h b/include/nucleus/vfs.h
index fd78c10..ebd5396 100644
--- a/include/nucleus/vfs.h
+++ b/include/nucleus/vfs.h
@@ -15,6 +15,8 @@ typedef struct SuperOps SuperOps;
 typedef struct Inode Inode;
 typedef struct InodeOps InodeOps;
 typedef struct DirEntry DirEntry;
+typedef struct File File;
+typedef struct FileOps FileOps;
 
 typedef Inode *(*mount_callback_t)(FSType *, int, const char *, void *);
 
@@ -44,6 +46,7 @@ struct Inode {
 	size_t size;
 	dev_t dev;
 	InodeOps *ops;
+	FileOps *fileOps;
 	SuperBlock *super;
 	union {
 		ObjectList *dirEntries;
@@ -62,10 +65,23 @@ struct DirEntry {
 	SuperBlock *super;
 };
 
+/* Structure for an open File */
+struct File {
+	Object obj;
+	Inode *inode;
+	int flags;
+	off_t pos;
+	FileOps *ops;
+	ObjectList *path;
+};
+struct FileOps {
+};
+
 extern ObjectType fstypeType;
 extern ObjectType fsType;
 extern ObjectType inodeType;
 extern ObjectType dirEntryType;
+extern ObjectType fileType;
 
 void init_vfs(void);
 void register_fstype(const char *name,	mount_callback_t mount);