diff --git a/include/ubixfs.h b/include/ubixfs.h index 050802b..2eca682 100644 --- a/include/ubixfs.h +++ b/include/ubixfs.h @@ -30,15 +30,21 @@ #ifndef __UBIXFS_H_ #define __UBIXFS_H_ +#include + class UbixFS { public: - int init(); + int init(dev_t *); + int read(dev_t *,void *,uInt32,uInt32); }; #endif /*** $Log$ + Revision 1.3 2004/08/13 16:58:57 reddawg + test + Revision 1.2 2004/08/13 16:51:55 reddawg Start of ubixfs shell diff --git a/include/vfs.h b/include/vfs.h index 7db42a7..df3b7c5 100644 --- a/include/vfs.h +++ b/include/vfs.h @@ -34,14 +34,14 @@ #include class vfs { - private: + protected: vfs *prev; vfs *next; public: dev_t *dev; UbixFS *fs; int vfs_initFS(); - int vfs_read(char *,long,long); + int vfs_read(void *,uInt32,uInt32); int vfs_Write(char *,long,long); int vfs_OpenFile(void *,void *); int vfs_Unlink(char *,void *); @@ -49,13 +49,15 @@ int vfs_RemDir(char *); int vfs_Sync(void); int vfs_Type; - int open(); }; #endif /*** $Log$ + Revision 1.2 2004/08/13 16:58:57 reddawg + test + Revision 1.1 2004/08/13 16:51:55 reddawg Start of ubixfs shell diff --git a/main.cc b/main.cc index 6790e9c..cffd23c 100644 --- a/main.cc +++ b/main.cc @@ -33,17 +33,22 @@ #include int main(int argc,char **argv) { + char data[512]; vfs *ubixfs_VFS = new(vfs); ubixfs_VFS->dev = dev_ramDrive(); ubixfs_VFS->vfs_initFS(); + ubixfs_VFS->vfs_read(&data,0,1); return(0x0); } /*** $Log$ + Revision 1.2 2004/08/13 16:51:55 reddawg + Start of ubixfs shell + END ***/ diff --git a/ramdrive.cc b/ramdrive.cc index e4d7978..aa2ca49 100644 --- a/ramdrive.cc +++ b/ramdrive.cc @@ -43,6 +43,8 @@ ramDrive = (dev_t *)malloc(sizeof(dev_t)); + ramDrive->major = 0x1; + ramDrive->read = ramDrive_read; return(ramDrive); @@ -50,6 +52,9 @@ /*** $Log$ + Revision 1.3 2004/08/13 16:58:57 reddawg + test + Revision 1.2 2004/08/13 16:54:14 reddawg fixed diff --git a/ubixfs.cc b/ubixfs.cc index fe63650..8cf1219 100644 --- a/ubixfs.cc +++ b/ubixfs.cc @@ -32,13 +32,22 @@ #include #include -int UbixFS::init() { - printf("Initializing UbixFS\n"); +int UbixFS::init(dev_t *dev) { + printf("Initializing UbixFS: [%i]\n",dev->major); return(0x0); } + +int UbixFS::read(dev_t *dev,void *ptr,uInt32 length,uInt32 offset) { + printf("UbixFS::read\n"); + dev->read(dev,ptr,length,offset); + return(length); + } /*** $Log$ + Revision 1.1 2004/08/13 16:58:57 reddawg + test + Revision 1.2 2004/08/13 16:51:55 reddawg Start of ubixfs shell diff --git a/vfs.cc b/vfs.cc index af694da..32e6fb1 100644 --- a/vfs.cc +++ b/vfs.cc @@ -33,12 +33,19 @@ #include int vfs::vfs_initFS() { - fs->init(); + fs->init(dev); return(0x0); } + +int vfs::vfs_read(void *ptr,uInt32 length,uInt32 offset) { + return(fs->read(dev,ptr,length,offset)); + } /*** $Log$ + Revision 1.3 2004/08/13 16:58:57 reddawg + test + Revision 1.2 2004/08/13 16:54:14 reddawg fixed