diff --git a/src/sys/ubixfsv2/btree.cpp b/src/sys/ubixfsv2/btree.cpp index 57e279b..e0af1d4 100644 --- a/src/sys/ubixfsv2/btree.cpp +++ b/src/sys/ubixfsv2/btree.cpp @@ -20,19 +20,19 @@ root = allocEmptyNode(); if (root == NULL) return; root->used = 1; - root->parent = NULL; + root->parent.bPtr = NULL; root->leaf = true; root->childCount[1] = 1; // cout << "---Creating " << inode->name << "@" << inode << endl; strncpy(root->keys[0], inode->name, B_MAX_NAME_LENGTH); // insert pointer to data page to the right of the data - root->head[1] = (void *)inode; - root->tail[1] = (void *)inode; + root->head[1].iPtr = inode; + root->tail[1].iPtr = inode; root->present[1] = true; if (inode != NULL) { - inode->next = inode->prev = NULL; + inode->next.bPtr = inode->prev.bPtr = NULL; } // if return; } // bTree:bTree @@ -55,17 +55,17 @@ if (root == NULL) return false; root->used = 1; - root->parent = NULL; + root->parent.bPtr = NULL; root->leaf = true; root->childCount[1] = 1; strncpy(root->keys[0], inode->name, B_MAX_NAME_LENGTH); // insert pointer to data page to the right of the data - root->head[1] = (void *)inode; - root->tail[1] = (void *)inode; + root->head[1].iPtr = inode; + root->tail[1].iPtr = inode; root->present[1] = true; - inode->next = inode->prev = NULL; + inode->next.iPtr = inode->prev.iPtr = NULL; return true; } // if @@ -82,14 +82,14 @@ // cout << "---Inserting " << inode->name << " @ " << inode << endl; while (bnode != NULL && !bnode->leaf) { if (strcmp(inode->name, bnode->keys[0]) < 0) { - bnode = (bNode *)bnode->head[0]; + bnode = bnode->head[0].bPtr; } else { if (strcmp(inode->name, bnode->keys[bnode->used-1]) >= 0) { - bnode = (bNode *)bnode->head[bnode->used]; + bnode = bnode->head[bnode->used].bPtr; } else { for (unsigned int i = 1; i < bnode->used; i++) { if (strcmp(inode->name, bnode->keys[i]) < 0) { - bnode = (bNode *)bnode->head[i]; + bnode = bnode->head[i].bPtr; break; } // if } // for i @@ -106,18 +106,18 @@ assert(inode); if (strcmp(inode->name, bnode->keys[curSlot = 0]) < 0) - tmpInode = (ubixfsInode *)bnode->head[curSlot]; + tmpInode = bnode->head[curSlot].iPtr; else if (strcmp(inode->name, bnode->keys[(curSlot = bnode->used)-1]) >= 0) - tmpInode = (ubixfsInode *)bnode->head[bnode->used]; + tmpInode = bnode->head[bnode->used].iPtr; else { for (curSlot = 1; curSlot < bnode->used; curSlot++) { if (strcmp(inode->name, bnode->keys[curSlot]) < 0) { - tmpInode = (ubixfsInode *)bnode->head[curSlot]; + tmpInode = bnode->head[curSlot].iPtr; break; } // if } // for curSlot - tmpInode = (ubixfsInode *)bnode->head[curSlot]; + tmpInode = bnode->head[curSlot].iPtr; } // else @@ -125,19 +125,20 @@ /* * This is the first node in this leaf */ - bnode->head[curSlot] = bnode->tail[curSlot] = inode; + bnode->head[curSlot].iPtr = bnode->tail[curSlot].iPtr = inode; bnode->present[curSlot] = true; if (curSlot == 0) { - if (bnode->head[1] != NULL) { - ubixfsInode * iptr = (ubixfsInode *)bnode->head[1]; - inode->prev = iptr->prev; - inode->next = iptr; - iptr->prev = inode; - if (inode->prev != NULL) inode->prev->next = (ubixfsInode *)inode; + if (bnode->head[1].iPtr != NULL) { + ubixfsInode * iptr = bnode->head[1].iPtr; + inode->prev.iPtr = iptr->prev.iPtr; + inode->next.iPtr = iptr; + iptr->prev.iPtr = inode; + if (inode->prev.iPtr != NULL) + inode->prev.iPtr->next.iPtr = inode; } else { - inode->next = inode->prev = NULL; + inode->next.iPtr = inode->prev.iPtr = NULL; } // else } else { @@ -148,39 +149,39 @@ /* * Add node to leaf page. Scan through to find where it goes. */ - if (strcmp(inode->name, ((ubixfsInode *)bnode->head[curSlot])->name) < 0) + if (strcmp(inode->name, bnode->head[curSlot].iPtr->name) < 0) { - inode->next = (ubixfsInode *)bnode->head[curSlot]; - inode->prev = inode->next->prev; - inode->next->prev = inode; - if (inode->prev != NULL) inode->prev->next = inode; - bnode->head[curSlot] = (void *)inode; + inode->next.iPtr = bnode->head[curSlot].iPtr; + inode->prev.iPtr = inode->next.iPtr->prev.iPtr; + inode->next.iPtr->prev.iPtr = inode; + if (inode->prev.iPtr != NULL) inode->prev.iPtr->next.iPtr = inode; + bnode->head[curSlot].iPtr = inode; } else { - if (strcmp(inode->name, ((ubixfsInode *)bnode->tail[curSlot])->name) > 0) { + if (strcmp(inode->name, bnode->tail[curSlot].iPtr->name) > 0) { - inode->prev = (ubixfsInode *)bnode->tail[curSlot]; - inode->next = inode->prev->next; - inode->prev->next = inode; + inode->prev.iPtr = bnode->tail[curSlot].iPtr; + inode->next.iPtr = inode->prev.iPtr->next.iPtr; + inode->prev.iPtr->next.iPtr = inode; - if (inode->next != NULL) inode->next->prev = inode; - bnode->tail[curSlot] = inode; + if (inode->next.iPtr != NULL) inode->next.iPtr->prev.iPtr = inode; + bnode->tail[curSlot].iPtr = inode; } else { - ubixfsInode * tmpInode = (ubixfsInode *)bnode->head[curSlot]; + ubixfsInode * tmpInode = bnode->head[curSlot].iPtr; for (unsigned int i = 0; i < bnode->childCount[curSlot]; i++) { if (strcmp(inode->name, tmpInode->name) < 0) { - inode->next = tmpInode; - inode->prev = tmpInode->prev; - inode->next->prev = inode; - inode->prev->next = inode; + inode->next.iPtr = tmpInode; + inode->prev.iPtr = tmpInode->prev.iPtr; + inode->next.iPtr->prev.iPtr = inode; + inode->prev.iPtr->next.iPtr = inode; break; } // if - tmpInode = tmpInode->next; + tmpInode = tmpInode->next.iPtr; } // for i } // else @@ -223,16 +224,16 @@ bnode->present[curSlot+1] = bnode->present[curSlot]; } // else - ubixfsInode * tmpInode = (ubixfsInode *)bnode->head[curSlot]; + ubixfsInode * tmpInode = bnode->head[curSlot].iPtr; for (unsigned int i = 0; i < (B_MAX_CHILD_COUNT+1) >> 1; i++) { assert(tmpInode); - tmpInode = tmpInode->next; + tmpInode = tmpInode->next.iPtr; } // for i strncpy(bnode->keys[curSlot], tmpInode->name, B_MAX_NAME_LENGTH); - bnode->head[curSlot+1] = (void *)tmpInode; - bnode->tail[curSlot] = (void *)tmpInode->prev; + bnode->head[curSlot+1].iPtr = tmpInode; + bnode->tail[curSlot].iPtr = tmpInode->prev.iPtr; bnode->childCount[curSlot] = (B_MAX_CHILD_COUNT+1) >> 1; bnode->childCount[curSlot+1] -= bnode->childCount[curSlot]; bnode->present[curSlot] = true; @@ -263,9 +264,7 @@ // cout << "shift: " << shift << endl; newNode->used = oldNode->used = B_MAX_KEYS >> 1; - newNode->parent = oldNode->parent; - assert(newNode->parent != oldNode); - assert(oldNode->parent != newNode); + newNode->parent.bPtr = oldNode->parent.bPtr; newNode->leaf = oldNode->leaf; // cout << "newNode->used: " << newNode->used << endl; @@ -306,7 +305,7 @@ if (!newNode->leaf) { for (unsigned int i = 0; i <= newNode->used; i++) { - ((bNode *)newNode->head[i])->parent = newNode; + newNode->head[i].bPtr->parent.bPtr = newNode; } // for i } // if newNode isn't a leaf @@ -317,13 +316,13 @@ // allocate a new root node ++header.treeDepth; root = allocEmptyNode(); - oldNode->parent = root; - newNode->parent = root; + oldNode->parent.bPtr = root; + newNode->parent.bPtr = root; // strncpy(root->keys[0], newNode->keys[0], B_MAX_NAME_LENGTH); strncpy(root->keys[0], tmpInode->name, B_MAX_NAME_LENGTH); - root->head[0] = oldNode; - root->tail[0] = root->tail[1] = NULL; - root->head[1] = newNode; + root->head[0].bPtr = oldNode; + root->tail[0].bPtr = root->tail[1].bPtr = NULL; + root->head[1].bPtr = newNode; root->used = 1; root->leaf = false; root->present[0] = root->present[1] = true; @@ -341,21 +340,14 @@ // cout << "-----" << endl; } else { - assert(newNode->parent != oldNode); - assert(oldNode->parent != newNode); - insertNode(newNode->parent, tmpInode->name, newNode, NULL); - assert(newNode->parent != oldNode); - assert(oldNode->parent != newNode); + insertNode(newNode->parent.bPtr, tmpInode->name, newNode); // if (oldNode->parent->used == B_MAX_KEYS) splitNode(oldNode->parent); } // else - assert(newNode->parent != oldNode); - assert(oldNode->parent != newNode); return; } // bTree::splitNode void -bTree::insertNode(bNode * node, const char * key, - void * headPtr, void * tailPtr) { +bTree::insertNode(bNode * node, const char * key, bNode * headPtr) { unsigned int curSlot = 0; if (node == NULL || key == NULL) return; @@ -363,8 +355,8 @@ curSlot = node->used; memset(node->keys[curSlot], 0, B_MAX_NAME_LENGTH); strncpy(node->keys[curSlot], key, B_MAX_NAME_LENGTH); - node->head[curSlot+1] = headPtr; - node->tail[curSlot+1] = tailPtr; + node->head[curSlot+1].bPtr = headPtr; + node->tail[curSlot+1].bPtr = NULL; node->present[curSlot+1] = true; node->childCount[node->used] = 0; // maybe? @@ -400,8 +392,8 @@ memset(node->keys[curSlot], 0, B_MAX_NAME_LENGTH); strncpy(node->keys[curSlot], key, B_MAX_NAME_LENGTH); - node->head[curSlot+1] = headPtr; - node->tail[curSlot+1] = tailPtr; + node->head[curSlot+1].bPtr = headPtr; + node->tail[curSlot+1].bPtr = NULL; node->present[curSlot+1] = true; // node->childCount[node->used] = ?; } // else @@ -416,7 +408,7 @@ memset(newNode, 0, sizeof(bNode)); newNode->magic1 = B_NODE_MAGIC_1; newNode->magic2 = B_NODE_MAGIC_2; - newNode->parent = NULL; + newNode->parent.bPtr = NULL; newNode->tag = ++tag; // this will start at 1 (0 is the header node) return newNode; } // bTree::allocEmptyNode @@ -425,13 +417,13 @@ bTree::Info(const bNode * node) { ubixfsInode * inode = NULL; if (node == NULL) return; - cout << node << " | " << node->parent << endl; + cout << node << " | " << node->parent.bPtr << endl; for (unsigned int i = 0; i <= node->used; i++) { - inode = (ubixfsInode *)node->head[i]; + inode = node->head[i].iPtr; // cout << "(" << node->childCount[i] << ")"; for (unsigned int k = 0; k < node->childCount[i]; k++) { cout << "[" << inode->name << "]"; - inode = inode->next; + inode = inode->next.iPtr; } // for k if (i != node->used) cout << " {" << node->keys[i] << "} "; } // for i @@ -466,12 +458,12 @@ cout << endl; for (unsigned int i = 0; i <= root->used; i++) { - cout << "CH[" << i << "]: " << root->head[i] << " "; + cout << "CH[" << i << "]: " << root->head[i].bPtr << " "; } // for i cout << endl; for (unsigned int i = 0; i <=root->used; i++) { - cout << "CT[" << i << "]: " << root->tail[i] << " "; + cout << "CT[" << i << "]: " << root->tail[i].bPtr << " "; } // for i cout << endl; for (unsigned int i = 0; i < root->used; i++) { @@ -481,14 +473,14 @@ cout << "root->used: " << root->used << endl; for (unsigned int i = 0; i <= root->used; i++) { - inode = (ubixfsInode *)root->head[i]; + inode = root->head[i].iPtr; cout << "root->childCount["<childCount[i] << endl; if (root->leaf) { cout << "root contains leaf node" << endl; for (unsigned int j = 0; j < root->childCount[i]; j++) { assert(inode); cout << "[" << i << "].[" << j << "]->" << inode->name << endl; - inode = inode->next; + inode = inode->next.iPtr; } // for j } // if root->leaf } // for i @@ -499,7 +491,7 @@ ubixfsInode * node = GetFirstNode(); while (node != NULL) { cout << node->name << endl; - node = node->next; + node = node->next.iPtr; } } // bTree::Print @@ -508,7 +500,7 @@ ubixfsInode * tmp = GetFirstNode(); while (tmp!=NULL) { if (strcmp(tmp->name, key) == 0) return tmp; - tmp = tmp->next; + tmp = tmp->next.iPtr; } return NULL; // return treeSearch(root, key); @@ -521,14 +513,14 @@ if (result == 0) return inode; if (result < 0) { - inode = inode->next; + inode = inode->next.iPtr; while (inode != NULL && ((result = strcmp(inode->name, key)) < 0)) { - inode = inode->next; + inode = inode->next.iPtr; } // while } else { - inode = inode->prev; + inode = inode->prev.iPtr; while (inode != NULL && ((result = strcmp(inode->name, key)) > 0)) { - inode = inode->prev; + inode = inode->prev.iPtr; } // while } // else return (result == 0 ? inode : NULL); @@ -550,14 +542,14 @@ // cout << "key: " << key << " keys[0]: " << bnode->keys[0] << " result: " << strcmp(key, bnode->keys[0]) << endl; if (strcmp(key, bnode->keys[0]) < 0) - return treeSearch((bNode *)bnode->head[0], key); + return treeSearch(bnode->head[0].bPtr, key); if (strcmp(key, bnode->keys[bnode->used-1]) >= 0) - return treeSearch((bNode *)bnode->head[bnode->used], key); + return treeSearch(bnode->head[bnode->used].bPtr, key); for (unsigned int i = 1; i < bnode->used; i++) { if (strcmp(key, bnode->keys[i]) < 0) - return treeSearch((bNode *)bnode->head[i], key); + return treeSearch(bnode->head[i].bPtr, key); } // for i return NULL; @@ -576,15 +568,15 @@ while (!tmpNode->leaf) { for (unsigned int i = 0; i < tmpNode->used; i++) { - if (tmpNode->head[i] != NULL) { - tmpNode = (bNode *)tmpNode->head[i]; + if (tmpNode->head[i].bPtr != NULL) { + tmpNode = tmpNode->head[i].bPtr; break; } // if } // for i } // while for (unsigned int i = 0; i < tmpNode->used; i++) { - if (tmpNode->head[i] != NULL) return (ubixfsInode * )tmpNode->head[i]; + if (tmpNode->head[i].iPtr != NULL) return tmpNode->head[i].iPtr; } // for i return NULL; } // bTree::GetFirstNode @@ -598,14 +590,14 @@ if (node->leaf) return node; if (strcmp(key, node->keys[0]) < 0) - return findLeafNode((bNode *)node->head[0], key); + return findLeafNode(node->head[0].bPtr, key); if (strcmp(key, node->keys[node->used-1]) >= 0) - return findLeafNode((bNode *)node->head[node->used], key); + return findLeafNode(node->head[node->used].bPtr, key); for (unsigned int i = 1; i < node->used; i++) { if (strcmp(key, node->keys[i]) < 0) - return findLeafNode((bNode *)node->head[i], key); + return findLeafNode(node->head[i].bPtr, key); } // for i return NULL; @@ -623,32 +615,40 @@ memcpy(tmpPtr, node, sizeof(bNode)); - if (node->parent != NULL) - ptr->parent = (bNode *)(node->parent->tag * sizeof(bNode)); + if (node->parent.bPtr != NULL) + ptr->parent.offset = node->parent.bPtr->tag * sizeof(bNode); else - ptr->parent = 0; + ptr->parent.offset = 0; for (unsigned int i = 0; i <= node->used; i++) { - bNode * bPtr = (bNode *)node->head[i]; + bNode * bPtr = node->head[i].bPtr; if (bPtr != NULL) - ptr->head[i] = (void *) (bPtr->tag * sizeof(bNode)); + ptr->head[i].offset = bPtr->tag * sizeof(bNode); else - ptr->head[i] = (void *) ~0; - + ptr->head[i].offset = ~0; + ptr->present[i] = false; } // for i cout << "fseeko() returned: " << fseeko(fd, myOffset, SEEK_SET) << endl; cout << "fwrite() returned: " << fwrite(ptr, sizeof(bNode), 1, fd) << endl; - if (node->leaf) return; + if (node->leaf) { - for (unsigned int i = 0; i <= node->used; i++) { + for (unsigned int i = 0; i <= node->used; i++) { + ubixfsInode * inode = node->head[i].iPtr; + // mji if (inode != NULL) tmp->head[i] = inode-> + } // for i + } else { - if (node->head[i] != NULL) saveNode(fd, (bNode *)node->head[i], tmpPtr); + for (unsigned int i = 0; i <= node->used; i++) { - } // for i + if (node->head[i].bPtr != NULL) saveNode(fd, node->head[i].bPtr, tmpPtr); + + } // for i + + } // else return; } // bTree::saveNode @@ -697,7 +697,7 @@ if (node == NULL) return true; while (node != NULL) { - ubixfsInode * next = node->next; + ubixfsInode * next = node->next.iPtr; if (next != NULL) { // cout << node->name << "::" << node->next->name << ":::" << strcmp(node->name, node->next->name) << endl; if (strcmp(node->name, next->name) > 0) return false; @@ -713,7 +713,7 @@ Info(node); if (!node->leaf) for (unsigned int i = 0; i <= node->used; i++) { - Print((bNode *)node->head[i]); + Print(node->head[i].bPtr); } // for i } // bTree::Print diff --git a/src/sys/ubixfsv2/btree.h b/src/sys/ubixfsv2/btree.h index c565df8..b0d5c79 100644 --- a/src/sys/ubixfsv2/btree.h +++ b/src/sys/ubixfsv2/btree.h @@ -1,6 +1,8 @@ #ifndef BTREE_H #define BTREE_H +#include + #include "superblock.h" #include "inode.h" #include "btreeheader.h" @@ -18,18 +20,19 @@ typedef struct bNode { uInt32 magic1 __attribute__ ((packed)); uInt32 used __attribute__ ((packed)); - bNode * parent __attribute__ ((packed)); + uPtr parent __attribute__ ((packed)); uInt64 tag __attribute__ ((packed)); char keys[B_MAX_KEYS][B_MAX_NAME_LENGTH] __attribute__ ((packed)); bool present[B_MAX_KEYS+1] __attribute__ ((packed)); - void * head[(B_MAX_KEYS+1)*8/sizeof(void *)] __attribute__ ((packed)); - void * tail[(B_MAX_KEYS+1)*8/sizeof(void *)] __attribute__ ((packed)); + uPtr head[B_MAX_KEYS+1] __attribute__ ((packed)); + uPtr tail[B_MAX_KEYS+1] __attribute__ ((packed)); uInt32 childCount[B_MAX_KEYS+1] __attribute__ ((packed)); uInt32 magic2 __attribute__ ((packed)); bool leaf __attribute__ ((packed)); char reserved[135] __attribute__ ((packed)); } bNode; // bNode +struct ubixfsInode; class bTree { protected: @@ -40,7 +43,7 @@ ubixfsInode * inodeSearch(ubixfsInode *, const char *); void splitNode(bNode *); bNode * allocEmptyNode(void); - void insertNode(bNode *, const char *, void *, void *); + void insertNode(bNode *, const char *, bNode *); bNode * findLeafNode(bNode *, const char *); void Print(bNode *); void saveNode(FILE *, bNode *, void *); diff --git a/src/sys/ubixfsv2/fsAbstract.h b/src/sys/ubixfsv2/fsAbstract.h index 67ca178..becf79b 100644 --- a/src/sys/ubixfsv2/fsAbstract.h +++ b/src/sys/ubixfsv2/fsAbstract.h @@ -28,6 +28,7 @@ virtual int vfs_format(dev_t *) = 0; virtual int vfs_stop(void) = 0; virtual int vfs_sync(void) = 0; + virtual void * vfs_mknod(void) = 0; /* Misc Functions */ virtual int vfs_unlink(const char *) = 0; diff --git a/src/sys/ubixfsv2/inode.h b/src/sys/ubixfsv2/inode.h index 1e9f900..66c7bd7 100644 --- a/src/sys/ubixfsv2/inode.h +++ b/src/sys/ubixfsv2/inode.h @@ -2,6 +2,7 @@ #define INODE_H #include "superblock.h" +#include "btree.h" #define INODE_IN_USE 0x00000001 #define ATTR_INODE 0x00000004 @@ -25,6 +26,16 @@ off_t size; } dataStream; +struct ubixfsInode; +struct bNode; + +typedef union uPtr { + inodeAddr iAddr; + bNode * bPtr; + ubixfsInode * iPtr; + off_t offset; +}; + typedef struct ubixfsInode { int32 magic1 __attribute__ ((packed)); inodeAddr inodeNum __attribute__ ((packed)); @@ -38,14 +49,12 @@ // inodeAddr attributes __attribute__ ((packed)); uInt32 type __attribute__ ((packed)); int32 inodeSize __attribute__ ((packed)); - struct ubixfsInode * parentBigPtr __attribute__ ((packed)); - struct ubixfsInode * parent __attribute__ ((packed)); - struct ubixfsInode * nextBigPtr __attribute__ ((packed)); - struct ubixfsInode * next __attribute__ ((packed)); - struct ubixfsInode * prevBigPtr __attribute__ ((packed)); - struct ubixfsInode * prev __attribute__ ((packed)); + uPtr parent __attribute__ ((packed)); + uPtr next __attribute__ ((packed)); + uPtr prev __attribute__ ((packed)); // binodeEtc *etc ?? dataStream data __attribute__ ((packed)); char smallData[3220] __attribute__ ((packed)); } ubixfsInode; + #endif diff --git a/src/sys/ubixfsv2/main.cpp b/src/sys/ubixfsv2/main.cpp index f15c50c..b6a0f2c 100644 --- a/src/sys/ubixfsv2/main.cpp +++ b/src/sys/ubixfsv2/main.cpp @@ -139,7 +139,7 @@ while (tmpInode != NULL) { //cout << "node[" << i++ << "]: " << tmpInode->name << endl; cout << tmpInode->name << endl; - tmpInode = (ubixfsInode *)tmpInode->next; + tmpInode = tmpInode->next.iPtr; } // while cout << sizeof(struct bNode) << endl; diff --git a/src/sys/ubixfsv2/ubixfs.cpp b/src/sys/ubixfsv2/ubixfs.cpp index 00e0ef0..80b5e36 100644 --- a/src/sys/ubixfsv2/ubixfs.cpp +++ b/src/sys/ubixfsv2/ubixfs.cpp @@ -9,7 +9,7 @@ } // UbixFS::UbixFS int -UbixFS::init(void) { +UbixFS::vfs_init(void) { return 0; } // UbixFS::init @@ -132,11 +132,17 @@ *ptr = -1; return count; } // UbixFS::get8FreeBlocks + +void * +UbixFS::vfs_mknod(void) { + return NULL; +} // UbixFS::mknod + int -UbixFS::format(dev_t * dev) { - +UbixFS::vfs_format(dev_t * dev) { + if (dev == NULL) return -1; return 0; -} // UbixFS::format +} // UbixFS::vfs_format UbixFS::~UbixFS(void) { delete [] freeBlockList; diff --git a/src/sys/ubixfsv2/ubixfs.h b/src/sys/ubixfsv2/ubixfs.h index 49746a8..ee649da 100644 --- a/src/sys/ubixfsv2/ubixfs.h +++ b/src/sys/ubixfsv2/ubixfs.h @@ -8,14 +8,15 @@ protected: signed char * freeBlockList; diskSuperBlock * superBlock; - int32 getFreeBlock(uInt32); - int32 getFreeBlock(void); - int32 get8FreeBlocks(uInt32); + int32 getFreeBlock(uInt32); + int32 getFreeBlock(void); + int32 get8FreeBlocks(uInt32); public: - UbixFS(dev_t *); - virtual int init(void); - virtual int format(dev_t *); - virtual ~UbixFS(void); + UbixFS(dev_t *); + virtual int vfs_init(void); + virtual int vfs_format(dev_t *); + virtual void * vfs_mknod(void); + virtual ~UbixFS(void); }; // UbixFS #endif // !UBIXFS_H