# HG changeset patch # User menikon # Date 1580284319 -32400 # Node ID 2fcabbf8cedae21ff090f3f755f0ad0d4988935b # Parent 29841ed2e11c5795bef913a48ca2a925343f7c1e fix diff -r 29841ed2e11c -r 2fcabbf8ceda src/impl/fs_impl.cbc --- a/src/impl/fs_impl.cbc Wed Jan 29 16:15:20 2020 +0900 +++ b/src/impl/fs_impl.cbc Wed Jan 29 16:51:59 2020 +0900 @@ -30,12 +30,12 @@ fs->writei = C_writeifs_impl; fs->namecmp = C_namecmpfs_impl; fs->dirlookup = C_dirlookupfs_impl; - fs->next = C_nextfs_impl; + fs->dirlink = C_dirlinkfs_impl; fs->namei = C_nameifs_impl; fs->nameiparent = C_nameiparentfs_impl; return fs; } -__code readsbfs_impl(struct fs_impl* fs, int dev, struct superblock* sb, __code next(...)) { +__code readsbfs_impl(struct fs_impl* fs, uint dev, struct superblock* sb, __code next(...)) { //:skip goto next(...); } @@ -80,7 +80,7 @@ goto next(...); } -__code statifs_impl(struct fs_impl* fs , struct inode* ip, struct stat* st, __code next(...)) { +__code statifs_impl(struct fs_impl* fs , struct inode* ip, struct stat* st, __code next(...)) { //:skip goto next(...); } @@ -105,8 +105,9 @@ goto next(...); } -__code nextfs_impl(...)) { +__code dirlinkfs_impl(struct fs_impl* fs, struct inode* dp, char* name, uint inum, __code next(...)) { + goto next(...); } __code nameifs_impl(struct fs_impl* fs, char* path, __code next(...)) { @@ -119,4 +120,3 @@ goto next(...); } - diff -r 29841ed2e11c -r 2fcabbf8ceda src/interface/fs.dg --- a/src/interface/fs.dg Wed Jan 29 16:15:20 2020 +0900 +++ b/src/interface/fs.dg Wed Jan 29 16:51:59 2020 +0900 @@ -1,6 +1,5 @@ typedef struct fs { union Data* fs; - int dev; struct superblock* sb; uint dev; short type; @@ -17,7 +16,7 @@ uint inum; char* path; - __code readsb(Impl* fs, int dev, struct superblock* sb, __code next(...)); + __code readsb(Impl* fs, uint dev, struct superblock* sb, __code next(...)); __code iinit(Impl* fs, __code next(...)); __code ialloc(Impl* fs, uint dev, short type, __code next(...)); __code iupdate(Impl* fs, struct inode* ip, __code next(...)); @@ -31,7 +30,7 @@ __code writei(Impl* fs, struct inode* ip, char* src, uint off, uint n, __code next(...)); __code namecmp(Impl* fs, const char* s, const char* t, __code next(...)); __code dirlookup(struct inode* dp, char* name, uint* poff, __code next(...)); - __code dirlink (Impl* fs, struct inode* dp, char* name, uint inum, __code next(...)); + __code dirlink(Impl* fs, struct inode* dp, char* name, uint inum, __code next(...)); __code namei(Impl* fs, char* path, __code next(...)); __code nameiparent(Impl* fs, char* path, char* name, __code next(...));