BarryServer : Git

All the code for all my projects
// BarryServer : Git / Orion / commit / e59e4fe0bbf5a3f56db0700ee49a81131b590f9c / vfs / vfs.h

// Related

Orion

Barry Adding pipes e59e4fe (2 years, 4 months ago)
diff --git a/vfs/vfs.h b/vfs/vfs.h
index ece5679..6997bf3 100644
--- a/vfs/vfs.h
+++ b/vfs/vfs.h
@@ -68,12 +68,14 @@ struct Inode {
 	Spinlock lock;
 	InodeOps *ops;
 	FileOps *fileOps;
+	void *extra;
+	void (*free_extra)(Inode *);
 	SuperBlock *super;
 	union {
 		DirEntry *dirEntries; /* List of Directory Entries */
 		PageCache *pages; /* List of Pages */
 	};
-	Inode *lnext; /* Next inode in super list */
+	Inode *lnext; /* Next inode in super's list */
 };
 struct InodeOps {
 	int (*create)(Inode *, DirEntry *, mode_t);
@@ -163,8 +165,8 @@ Inode *lookup(const char *name, CustodyChain *chain);
 
 int open(const char *name, int flags, ...); /* mode_t mode */
 int close(int fd);
-size_t read(int fd, void *buf, size_t count);
-size_t write(int fd, void *buf, size_t count);
+int read(int fd, void *buf, size_t count);
+int write(int fd, void *buf, size_t count);
 int ioctl(int fd, unsigned long request, ...);
 off_t lseek(int fd, off_t offset, int whence);
 int stat(const char *pathname, struct stat *statbuf);
@@ -175,6 +177,7 @@ int mknod(const char *pathname, mode_t mode, dev_t dev);
 int rename(const char *oldpath, const char *newpath);
 int dup(int oldfd);
 int dup2(int oldfd, int newfd);
+int pipe(int pipefd[2]);
 int mount(const char *src, const char *target, const char *type,
           unsigned long flags, void *data);
 int chdir(const char *path);