diff src/impl/fs_impl.cbc @ 233:08a367c3124a

add FileSystem files
author menikon
date Wed, 29 Jan 2020 15:58:12 +0900
parents
children 29841ed2e11c
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/impl/fs_impl.cbc	Wed Jan 29 15:58:12 2020 +0900
@@ -0,0 +1,122 @@
+#include "../context.h"
+#interface "fs.h"
+
+// ----
+// typedef struct fs_impl<Impl, Isa> impl fs{
+//     union Data* fs_impl;
+// 
+// 
+// 
+// 
+// } fs_impl;
+// ----
+
+fs* createfs_impl(struct Context* cbc_context) {
+    struct fs* fs  = new fs();
+    struct fs_impl* fs_impl = new fs_impl();
+    fs->fs = (union Data*)fs_impl;
+    fs_impl->fs_impl = NULL;
+    fs->readsb = C_readsbfs_impl;
+    fs->iinit = C_iinitfs_impl;
+    fs->ialloc = C_iallocfs_impl;
+    fs->iupdate = C_iupdatefs_impl;
+    fs->idup = C_idupfs_impl;
+    fs->ilock = C_ilockfs_impl;
+    fs->iunlock = C_iunlockfs_impl;
+    fs->iput = C_iputfs_impl;
+    fs->iunlockput = C_iunlockputfs_impl;
+    fs->stati = C_statifs_impl;
+    fs->readi = C_readifs_impl;
+    fs->writei = C_writeifs_impl;
+    fs->namecmp = C_namecmpfs_impl;
+    fs->dirlookup = C_dirlookupfs_impl;
+    fs->next = C_nextfs_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(...)) {
+
+    goto next(...);
+}
+
+__code iinitfs_impl(struct fs_impl* fs, __code next(...)) {
+
+    goto next(...);
+}
+
+__code iallocfs_impl(struct fs_impl* fs, uint dev, short type, __code next(...)) {
+
+    goto next(...);
+}
+
+__code iupdatefs_impl(struct fs_impl* fs, struct inode* ip, __code next(...)) {
+
+    goto next(...);
+}
+
+__code idupfs_impl(struct fs_impl* fs, struct inode* ip, __code next(...)) {
+
+    goto next(...);
+}
+
+__code ilockfs_impl(struct fs_impl* fs, struct inode* ip, __code next(...)) {
+
+    goto next(...);
+}
+
+__code iunlockfs_impl(struct fs_impl* fs, struct inode* ip, __code next(...)) {
+
+    goto next(...);
+}
+
+__code iputfs_impl(struct fs_impl* fs, struct inode* ip, __code next(...)) {
+
+    goto next(...);
+}
+
+__code iunlockputfs_impl(struct fs_impl* fs, struct inode* ip, __code next(...)) {
+
+    goto next(...);
+}
+
+__code statifs_impl(struct fs_impl* fs , struct inode* ip, struct stat* st, __code next(...)) {
+
+    goto next(...);
+}
+
+__code readifs_impl(struct fs_impl* fs, struct inode* ip, char* dst, uint off, uint n, __code next(...)) {
+
+    goto next(...);
+}
+
+__code writeifs_impl(struct fs_impl* fs, struct inode* ip, char* src, uint off, uint n, __code next(...)) {
+
+    goto next(...);
+}
+
+__code namecmpfs_impl(struct fs_impl* fs, const char* s, const char* t, __code next(...)) {
+
+    goto next(...);
+}
+
+__code dirlookupfs_impl(struct inode* dp, char* name, uint* poff, __code next(...)) {
+
+    goto next(...);
+}
+
+__code nextfs_impl(...)) {
+
+}
+
+__code nameifs_impl(struct fs_impl* fs, char* path, __code next(...)) {
+
+    goto next(...);
+}
+
+__code nameiparentfs_impl(struct fs_impl* fs, char* path, char* name, __code next(...)) {
+
+    goto next(...);
+}
+
+