Changeset 810
- Timestamp:
- 07/15/08 10:35:33 (1 month ago)
- Location:
- Whitix/branches/fs/fs/fat
- Files:
-
- 4 modified
Legend:
- Unmodified
- Added
- Removed
-
Whitix/branches/fs/fs/fat/Makefile
r703 r810 4 4 5 5 build: $(MODULES) 6 ld $(LD_R_FLAGS) $(MODULES) -o fat.sys 6 ld $(LD_R_FLAGS) $(MODULES) -o fatfs.sys 7 8 modules_install: 9 cp fatfs.sys ../../CdRoot/System/Modules/Filesystems 7 10 8 11 include $(DEPTH)make.inc -
Whitix/branches/fs/fs/fat/fat.h
r747 r810 40 40 #define ATTR_EXT (ATTR_RDONLY | ATTR_HIDDEN | ATTR_SYSTEM | ATTR_LABEL) 41 41 42 #define FAT_DOT ". "43 #define FAT_DOTDOT ".. "42 #define FAT_DOT ". " 43 #define FAT_DOTDOT ".. " 44 44 45 45 #define FAT_ISREGULAR(attr) (!((attr) & ATTR_LABEL) && !((attr) & ATTR_DIR)) -
Whitix/branches/fs/fs/fat/super.c
r705 r810 29 29 struct SuperBlockOps fatSbOps= 30 30 { 31 .allocVNode = NULL,32 31 .readVNode = FatReadVNode, 33 32 .writeVNode = FatWriteVNode, -
Whitix/branches/fs/fs/fat/vnode.c
r747 r810 196 196 DWORD startCluster=0,gpCluster; 197 197 198 /* Is this case ever reached? */ 198 199 if (dir->id == FAT_ROOT_ID) 199 200 return FAT_ROOT_ID; … … 206 207 207 208 /* Is the root directory then */ 208 if ( !startCluster)209 if (startCluster == FatGetSbPriv(dir->superBlock)->rootDirStart) 209 210 return FAT_ROOT_ID; 210 211 … … 621 622 dirEntry->fileSize=size; 622 623 623 /* Write the directory entry out */624 BlockWrite(dir->superBlock->sDevice,buffer);625 BlockFree(buffer);626 627 624 /* Add the '..' entry */ 628 625 err=FatAddShortName(*retVal,FAT_DOTDOT,-1,&vNum,ATTR_DIR); … … 630 627 return err; 631 628 632 buffer=BlockRead(dir->superBlock->sDevice,VNUM_TO_SECTOR(vNum));633 629 dirEntry=(struct FatDirEntry*)(buffer->data+VNUM_TO_OFFSET(vNum)*sizeof(struct FatDirEntry)); 634 630 dirEntry->startClusterHigh=FatGetPriv(dir)->startCluster >> 16; … … 637 633 638 634 /* Write the directory entry out */ 639 BlockWrite(dir->superBlock->sDevice, buffer);640 B lockFree(buffer);635 BlockWrite(dir->superBlock->sDevice, buffer); 636 BufferRelease(buffer); 641 637 642 638 return 0;
