Changeset 1911 for Whitix/trunk/fs/fat/vnode.c
- Timestamp:
- 02/24/09 20:55:43 (3 years ago)
- Files:
-
- 1 modified
-
Whitix/trunk/fs/fat/vnode.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Whitix/trunk/fs/fat/vnode.c
r1909 r1911 215 215 216 216 /* Is the root directory then */ 217 if (!startCluster || ( (info->fatType == 32) && (info->rootDirStart == startCluster) ))217 if (!startCluster) 218 218 return FAT_ROOT_ID; 219 219 … … 710 710 711 711 dirEntry=(struct FatDirEntry*)(buffer->data+FAT_DIR_POS(VNUM_TO_OFFSET(vNum))); 712 dirEntry->startClusterHigh=FatGetPriv(dir)->startCluster >> 16; 713 dirEntry->startClusterLow=FatGetPriv(dir)->startCluster & 0xFFFF; 712 713 if (dir->id != FAT_ROOT_ID) 714 { 715 dirEntry->startClusterHigh=FatGetPriv(dir)->startCluster >> 16; 716 dirEntry->startClusterLow=FatGetPriv(dir)->startCluster & 0xFFFF; 717 }else{ 718 /* If the parent is the root directory, the start cluster should 719 * always point to 0, even on FAT32, where the root directory has its 720 * own start cluster. 721 */ 722 dirEntry->startClusterHigh = 0; 723 dirEntry->startClusterLow = 0; 724 } 725 714 726 dirEntry->fileSize=0; 715 727
