diff --git a/src/sys/pci/hd.c b/src/sys/pci/hd.c index eff8303..111f91c 100644 --- a/src/sys/pci/hd.c +++ b/src/sys/pci/hd.c @@ -117,7 +117,7 @@ char retVal = 0x0; long counter = 0x0; short *tmp = 0x0; - struct driveInfo *hdd = dev->info; + struct driveInfo *hdd = dev->devInfo->info; for (counter = 1000000;counter >= 0;counter--) { retVal = inportByte(hdd->hdPort + hdStat) & 0x80; if (!retVal) goto ready; @@ -315,6 +315,9 @@ /*** $Log$ + Revision 1.9 2004/05/19 15:07:59 reddawg + Typo defInfo should of been devInfo + Revision 1.7 2004/05/19 04:07:43 reddawg kmalloc(size,pid) no more it is no kmalloc(size); the way it should of been diff --git a/src/sys/ubixfs/block.c b/src/sys/ubixfs/block.c index 15b6b8a..a72e495 100644 --- a/src/sys/ubixfs/block.c +++ b/src/sys/ubixfs/block.c @@ -24,6 +24,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. $Log$ + Revision 1.2 2004/04/28 02:22:55 reddawg + This is a fiarly large commit but we are starting to use new driver model + all around + Revision 1.1.1.1 2004/04/15 12:07:07 reddawg UbixOS v1.0 @@ -44,7 +48,7 @@ void syncBat(struct mountPoints *mp) { struct ubixFsInfo *fsInfo = mp->fsInfo; - mp->device->write(mp->device->info,fsInfo->blockAllocationTable,mp->diskLabel->partitions[mp->partition].pOffset,mp->diskLabel->partitions[mp->partition].pBatSize); + mp->device->devInfo->write(mp->device->devInfo->info,fsInfo->blockAllocationTable,mp->diskLabel->partitions[mp->partition].pOffset,mp->diskLabel->partitions[mp->partition].pBatSize); } int freeBlocks(int block,fileDescriptor *fd) { diff --git a/src/sys/ubixfs/directory.c b/src/sys/ubixfs/directory.c index ec280dc..55ff8e7 100644 --- a/src/sys/ubixfs/directory.c +++ b/src/sys/ubixfs/directory.c @@ -24,6 +24,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. $Log$ + Revision 1.3 2004/05/19 04:07:43 reddawg + kmalloc(size,pid) no more it is no kmalloc(size); the way it should of been + Revision 1.2 2004/04/28 02:22:55 reddawg This is a fiarly large commit but we are starting to use new driver model all around @@ -93,7 +96,7 @@ entry->permissions = 0xEAA; sprintf(entry->fileName,directory); - fd->mp->device->write(fd->mp->device->info,dir,fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[block].realSector,blockSize); + fd->mp->device->devInfo->write(fd->mp->device->devInfo->info,dir,fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[block].realSector,blockSize); addDirEntry(entry,fd); kfree(dir); kfree(entry); diff --git a/src/sys/ubixfs/ubixfs.c b/src/sys/ubixfs/ubixfs.c index b81979a..7ba4bf4 100644 --- a/src/sys/ubixfs/ubixfs.c +++ b/src/sys/ubixfs/ubixfs.c @@ -24,6 +24,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. $Log$ + Revision 1.6 2004/05/19 04:07:43 reddawg + kmalloc(size,pid) no more it is no kmalloc(size); the way it should of been + Revision 1.5 2004/04/29 15:45:19 reddawg Fixed some bugs so now the automade images will work correctly @@ -85,7 +88,7 @@ /* fsInfo->blockAllocationTable[0].nextBlock = 100; */ fsInfo->batEntries = ((mp->diskLabel->partitions[mp->partition].pBatSize*512)/sizeof(struct blockAllocationTableEntry)); kprintf("C"); - mp->device->read(mp->device->info,fsInfo->blockAllocationTable,mp->diskLabel->partitions[mp->partition].pOffset,mp->diskLabel->partitions[mp->partition].pBatSize); + mp->device->devInfo->read(mp->device->devInfo->info,fsInfo->blockAllocationTable,mp->diskLabel->partitions[mp->partition].pOffset,mp->diskLabel->partitions[mp->partition].pBatSize); kprintf("Offset: [%i], Partition: [%i]\n",mp->diskLabel->partitions[mp->partition].pOffset,mp->partition); kprintf("UbixFS Initialized\n"); } @@ -102,7 +105,7 @@ int x=0; struct directoryEntry *dirEntry = (struct directoryEntry *)kmalloc(4096); struct ubixFsInfo *fsInfo = fd->mp->fsInfo; - fd->mp->device->read(fd->mp->device->info,dirEntry,(fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[0].realSector),8); + fd->mp->device->devInfo->read(fd->mp->device->devInfo->info,dirEntry,(fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[0].realSector),8); if ((fd->mode & fileRead) == fileRead) { for (x=0;x<(4096/sizeof(struct directoryEntry));x++) { if ((int)!kstrcmp(dirEntry[x].fileName,file)) { @@ -134,7 +137,7 @@ fd->size = 0x0; fd->start = dirEntry[x].startCluster; fd->dirBlock = 0x0; - fd->mp->device->write(fd->mp->device->info,dirEntry,(fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[0].realSector),8); + fd->mp->device->devInfo->write(fd->mp->device->devInfo->info,dirEntry,(fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[0].realSector),8); kfree(dirEntry); return(0x1); } @@ -179,26 +182,26 @@ } /* fd->mp->drive->read(fd->mp->drive->driveInfoStruct,diskLabel->partitions[0].pOffset+blockAllocationTable[batIndex].realSector,8,fd->buffer); */ fd->buffer[offset-(blockCount*4096)] = ch; - fd->mp->device->write(fd->mp->device->info,fd->buffer,fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[batIndex].realSector,8); + fd->mp->device->devInfo->write(fd->mp->device->devInfo->info,fd->buffer,fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[batIndex].realSector,8); } else { if (fd->status != fdRead) { - fd->mp->device->read(fd->mp->device->info,fd->buffer,fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[batIndex].realSector,8); + fd->mp->device->devInfo->read(fd->mp->device->devInfo->info,fd->buffer,fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[batIndex].realSector,8); fd->status = fdRead; } fd->buffer[offset-(blockCount*4096)] = ch; - fd->mp->device->write(fd->mp->device->info,fd->buffer,fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[batIndex].realSector,8); + fd->mp->device->devInfo->write(fd->mp->device->devInfo->info,fd->buffer,fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[batIndex].realSector,8); } if (offset > fd->size) { fd->size = offset; dirEntry = (struct directoryEntry *)kmalloc(4096); - fd->mp->device->read(fd->mp->device->info,dirEntry,(fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[fd->dirBlock].realSector),8); + fd->mp->device->devInfo->read(fd->mp->device->devInfo->info,dirEntry,(fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[fd->dirBlock].realSector),8); for (i=0x0;i<(4096/sizeof(struct directoryEntry));i++) { if ((int)!kstrcmp(dirEntry[i].fileName,fd->fileName)) break; } dirEntry[i].size = fd->size; - fd->mp->device->write(fd->mp->device->info,dirEntry,(fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[fd->dirBlock].realSector),8); + fd->mp->device->devInfo->write(fd->mp->device->devInfo->info,dirEntry,(fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[fd->dirBlock].realSector),8); kfree(dirEntry); } return(ch); @@ -227,7 +230,7 @@ } } /* If The File Size Is Greater Then The Offset Lets Goto Work */ - fd->mp->device->read(fd->mp->device->info,fd->buffer,fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[batIndex].realSector,blockSize); + fd->mp->device->devInfo->read(fd->mp->device->devInfo->info,fd->buffer,fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[batIndex].realSector,blockSize); for (i=0x0;i fd->size) { /* Set File EOF If There Is Nothing To Do */ @@ -240,7 +243,7 @@ offset++; if (offset%4096 == 0 && offset != size) { batIndex = fsInfo->blockAllocationTable[batIndex].nextBlock; - fd->mp->device->read(fd->mp->device->info,fd->buffer,fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[batIndex].realSector,blockSize); + fd->mp->device->devInfo->read(fd->mp->device->devInfo->info,fd->buffer,fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[batIndex].realSector,blockSize); blockCount++; } } @@ -281,7 +284,7 @@ } } - fd->mp->device->read(fd->mp->device->info,fd->buffer,fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[blockIndex].realSector,blockSize); + fd->mp->device->devInfo->read(fd->mp->device->devInfo->info,fd->buffer,fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[blockIndex].realSector,blockSize); for (i = 0x0;i < size;i++) { fd->buffer[(offset- (blockOffset *0x1000))] = data[i]; @@ -289,7 +292,7 @@ if (offset%4096 == 0x0) { blockOffset++; - fd->mp->device->write(fd->mp->device->info,fd->buffer,fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[blockIndex].realSector,blockSize); + fd->mp->device->devInfo->write(fd->mp->device->devInfo->info,fd->buffer,fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[blockIndex].realSector,blockSize); if (fsInfo->blockAllocationTable[blockIndex].nextBlock == EOBC) { blockIndexPrev = blockIndex; @@ -299,23 +302,23 @@ } else { blockIndex = fsInfo->blockAllocationTable[blockIndex].nextBlock; - fd->mp->device->read(fd->mp->device->info,fd->buffer,fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[blockIndex].realSector,blockSize); + fd->mp->device->devInfo->read(fd->mp->device->devInfo->info,fd->buffer,fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[blockIndex].realSector,blockSize); } } } - fd->mp->device->write(fd->mp->device->info,fd->buffer,fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[blockIndex].realSector,blockSize); + fd->mp->device->devInfo->write(fd->mp->device->devInfo->info,fd->buffer,fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[blockIndex].realSector,blockSize); if (offset > fd->size) { fd->size = offset; dirEntry = (struct directoryEntry *)kmalloc(4096); - fd->mp->device->read(fd->mp->device->info,dirEntry,(fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[fd->dirBlock].realSector),blockSize); + fd->mp->device->devInfo->read(fd->mp->device->devInfo->info,dirEntry,(fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[fd->dirBlock].realSector),blockSize); for (i=0x0;i<(4096/sizeof(struct directoryEntry));i++) { if ((int)!kstrcmp(dirEntry[i].fileName,fd->fileName)) break; } dirEntry[i].size = fd->size; dirEntry[i].startCluster = fd->start; - fd->mp->device->write(fd->mp->device->info,dirEntry,(fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[fd->dirBlock].realSector),blockSize); + fd->mp->device->devInfo->write(fd->mp->device->devInfo->info,dirEntry,(fd->mp->diskLabel->partitions[fd->mp->partition].pOffset+fsInfo->blockAllocationTable[fd->dirBlock].realSector),blockSize); kfree(dirEntry); } /* Return */ @@ -327,13 +330,13 @@ struct directoryEntry *dirEntry = (struct directoryEntry *)kmalloc(0x1000); struct ubixFsInfo *fsInfo = mp->fsInfo; - mp->device->read(mp->device->info,dirEntry,(mp->diskLabel->partitions[mp->partition].pOffset+fsInfo->blockAllocationTable[0].realSector),8); + mp->device->devInfo->read(mp->device->devInfo->info,dirEntry,(mp->diskLabel->partitions[mp->partition].pOffset+fsInfo->blockAllocationTable[0].realSector),8); for (x=0;x<(4096/sizeof(struct directoryEntry));x++) { if ((int)!kstrcmp(dirEntry[x].fileName,path)) { dirEntry[x].attributes |= typeDeleted; dirEntry[x].fileName[0] = '?'; - mp->device->write(mp->device->info,dirEntry,(mp->diskLabel->partitions[mp->partition].pOffset+fsInfo->blockAllocationTable[0].realSector),8); + mp->device->devInfo->write(mp->device->devInfo->info,dirEntry,(mp->diskLabel->partitions[mp->partition].pOffset+fsInfo->blockAllocationTable[0].realSector),8); return; } }