Mercurial > hg > Members > menikon > CbC_xv6
changeset 229:696c6bdc1074
tweak
author | menikon |
---|---|
date | Sat, 25 Jan 2020 16:42:09 +0900 |
parents | e2520f609094 |
children | 4265c6e825af |
files | src/impl/file_impl_inode.cbc src/impl/inode.h |
diffstat | 2 files changed, 17 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/impl/file_impl_inode.cbc Fri Jan 24 21:19:48 2020 +0900 +++ b/src/impl/file_impl_inode.cbc Sat Jan 25 16:42:09 2020 +0900 @@ -1,4 +1,4 @@ -#include "../context.h" +#include "../../context.h" #interface "file.h" // ---- @@ -9,17 +9,27 @@ file* createinode(struct Context* cbc_context) { struct file* file = new file(); - struct inode* inode = new inode(); + struct inode* ip = new ip(); file->file = (union Data*)inode; file->st = NULL; file->addr = NULL; file->n = 0; file->fd = 0; + file->stat = C_statinode; file->read = C_readinode; file->write = C_writeinode; file->close = C_closeinode; return file; } + +__code statinode(struct inode* ip, struct stat* st, __code next(...)) { //:skip + + goto cbc_statinode(ip, st, next(...)); +} + +__code cbc_statinode((struct inode* ip, struct stat* st, __code next(...)){ +} + __code readinode(struct inode* file, char* addr, __code next(...)) { goto next(...);