diff --git a/ramdrive.cc b/ramdrive.cc index 6e7d536..3515446 100644 --- a/ramdrive.cc +++ b/ramdrive.cc @@ -40,7 +40,7 @@ static int ramDrive_read(dev_t *dev,void *ptr,uInt32 length,uInt32 offset) { char *data = ram_data + offset; - memcpy(ptr,data,length); + memcpy(ptr,data,length * 512); return(length); } @@ -48,7 +48,7 @@ static int ramDrive_write(dev_t *dev,void *ptr,uInt32 length,uInt32 offset) { char *data = ram_data + offset; - memcpy(data,ptr,length); + memcpy(data,ptr,length * 512); return(length); } @@ -94,6 +94,9 @@ /*** $Log$ + Revision 1.7 2004/08/13 22:06:54 reddawg + UbixFS: fixed the test shell + Revision 1.6 2004/08/13 21:47:49 reddawg Fixed diff --git a/ubixfs.cc b/ubixfs.cc index c0d399f..83fe2bd 100644 --- a/ubixfs.cc +++ b/ubixfs.cc @@ -36,7 +36,8 @@ printf("Initializing UbixFS: [%s:%i]\n",name,dev->major); /* Load our super block */ - dev->read(dev,&superBlock,1024,0x0); + /* must read/write in 512 byte blocks */ + dev->read(dev,&superBlock,2,0x0); printf("superBlock: [%s]\n",superBlock); return(0x0); @@ -44,6 +45,7 @@ int UbixFS::read(dev_t *dev,Ubix_FD *fd,void *ptr,uInt32 length,uInt32 nmemb) { printf("UbixFS::read, Length: [%i]\n",fd->length); + /* must read/write in 512 byte blocks */ dev->read(dev,ptr,length * nmemb,fd->offset); return(length); } @@ -57,6 +59,7 @@ int UbixFS::write(dev_t *dev,Ubix_FD *fd,void *ptr,uInt32 length,uInt32 nmemb) { printf("UbixFS::write, Length: [%i]\n",fd->length); + /* must read/write in 512 byte blocks */ dev->write(dev,ptr,length * nmemb,fd->offset); fd->offset += length; return(length); @@ -73,6 +76,9 @@ /*** $Log$ + Revision 1.7 2004/08/13 22:06:54 reddawg + UbixFS: fixed the test shell + Revision 1.6 2004/08/13 21:56:43 reddawg Done for the night