/haiku-fatelf/src/add-ons/kernel/file_systems/fat/ |
H A D | fat.h | 12 #define vIS_DATA_CLUSTER(vol,cluster) (((cluster) >= 2) && ((cluster) < vol->total_clusters + 2)) 13 #define IS_DATA_CLUSTER(cluster) vIS_DATA_CLUSTER(vol,cluster) 15 // cluster 1 represents root directory for fat12 and fat16 16 #define IS_FIXED_ROOT(cluster) ((cluster) == 1) 19 int32 get_nth_fat_entry(nspace *vol, int32 cluster, uint32 n); 20 uint32 count_clusters(nspace *vol, int32 cluster); [all...] |
H A D | fat.c | 83 // get_entry: cluster #. returns int32 entry/status 84 // set_entry: cluster #, value. returns int32 status 85 // allocate: # clusters in N, returns int32 status/starting cluster 95 _fat_ioctl_(nspace *vol, uint32 action, uint32 cluster, int32 N) argument 112 DPRINTF(3, ("_fat_ioctl_: action %lx, cluster %ld, N %ld\n", action, 113 cluster, N)); 117 // use a optimized version of the cluster counting algorithms 120 cluster = 2; 124 cluster = vol->last_allocated; 127 if (!IS_DATA_CLUSTER(cluster)) { 362 get_fat_entry(nspace *vol, uint32 cluster) argument 384 set_fat_entry(nspace *vol, uint32 cluster, int32 value) argument 392 get_nth_fat_entry(nspace *vol, int32 cluster, uint32 n) argument 410 count_clusters(nspace *vol, int32 cluster) argument 445 clear_fat_chain(nspace *vol, uint32 cluster) argument 632 dump_fat_chain(nspace *vol, uint32 cluster) argument [all...] |
H A D | iter.c | 24 _validate_cs_(nspace *vol, uint32 cluster, uint32 sector) argument 28 if ((vol->fat_bits != 32) && IS_FIXED_ROOT(cluster)) { // fat12 or fat16 root 36 if (!IS_DATA_CLUSTER(cluster)) return -1; 46 ASSERT(_validate_cs_(csi->vol, csi->cluster, csi->sector) == 0); 47 if (_validate_cs_(csi->vol, csi->cluster, csi->sector) != 0) 50 if (IS_FIXED_ROOT(csi->cluster)) 54 (off_t)(csi->cluster - 2)* csi->vol->sectors_per_cluster + 60 init_csi(nspace *vol, uint32 cluster, uint32 sector, struct csi *csi) argument 63 if ((ret = _validate_cs_(vol,cluster,sector)) != 0) 66 csi->vol = vol; csi->cluster 269 diri_init(nspace *vol, uint32 cluster, uint32 index, struct diri *diri) argument [all...] |
H A D | dlist.h | 12 ino_t dlist_find(nspace *vol, uint32 cluster);
|
H A D | iter.h | 14 /* csi keeps track of current cluster and sector info */ 17 uint32 cluster; member in struct:csi 22 int init_csi(struct _nspace *vol, uint32 cluster, uint32 sector, struct csi *csi); 39 uint8 *diri_init(struct _nspace *vol, uint32 cluster, uint32 index, struct diri *diri);
|
H A D | dlist.c | 12 We don't worry about aliases for directories since their cluster values will 13 always be the same -- searches are performed only on the starting cluster 140 dlist_find(nspace *vol, uint32 cluster) argument 144 DPRINTF(1, ("dlist_find cluster %lx\n", cluster)); 146 ASSERT(((cluster >= 2) && (cluster < vol->total_clusters + 2)) || (cluster == 1)); 154 if (CLUSTER_OF_DIR_CLUSTER_VNID(loc) == cluster) 158 DPRINTF(1, ("dlist_find cluster [all...] |
H A D | file.c | 36 /* simple cluster cache */ 40 uint32 cluster; member in struct:filecookie::__anon2295 84 if ((node->cluster != 0) && !IS_DATA_CLUSTER(node->cluster)) { 85 dprintf("write_vnode_entry called on invalid cluster (%lx)\n", node->cluster); 102 buffer[0x1a] = node->cluster & 0xff; // starting cluster 103 buffer[0x1b] = (node->cluster >> 8) & 0xff; 105 buffer[0x14] = (node->cluster >> 1 [all...] |
H A D | dir.c | 49 uint32 cluster; member in struct:_dirent_info_ 81 DPRINTF(2, ("_next_dirent_: %lx/%lx/%lx\n", iter->csi.cluster, 191 oinfo->cluster = read16(buffer,0x1a); 193 oinfo->cluster += 0x10000*read16(buffer,0x14); 226 ino_t loc = (IS_DATA_CLUSTER(info.cluster)) 227 ? GENERATE_DIR_CLUSTER_VNID(dir->vnid, info.cluster) 253 if (dlist_find(vol, info.cluster) == -1LL) { 277 if (diri_init(vol, dir->cluster, 0, &iter) == NULL) { 380 if (diri_init(vol, dir->cluster, 0, &diri) == NULL) { 495 if (IS_FIXED_ROOT(dir->cluster)) 574 uint32 cluster; member in struct:_entry_info_ [all...] |
/haiku-fatelf/src/tests/add-ons/kernel/file_systems/dos/r5/ |
H A D | fat.h | 8 #define vIS_DATA_CLUSTER(vol,cluster) (((cluster) >= 2) && ((cluster) < vol->total_clusters + 2)) 9 #define IS_DATA_CLUSTER(cluster) vIS_DATA_CLUSTER(vol,cluster) 11 // cluster 1 represents root directory for fat12 and fat16 12 #define IS_FIXED_ROOT(cluster) ((cluster) == 1) 15 int32 get_nth_fat_entry(nspace *vol, int32 cluster, uint32 n); 16 uint32 count_clusters(nspace *vol, int32 cluster); [all...] |
H A D | fat.c | 74 // get_entry: cluster #. returns int32 entry/status 75 // set_entry: cluster #, value. returns int32 status 76 // allocate: # clusters in N, returns int32 status/starting cluster 80 static int32 _fat_ioctl_(nspace *vol, uint32 action, uint32 cluster, int32 N) argument 96 DPRINTF(3, ("_fat_ioctl_: action %lx, cluster %lx, N %lx\n", action, cluster, N)); 101 // use a optimized version of the cluster counting algorithms 104 cluster = 2; 108 cluster = vol->last_allocated; 111 if (!IS_DATA_CLUSTER(cluster)) { 304 get_fat_entry(nspace *vol, uint32 cluster) argument 324 set_fat_entry(nspace *vol, uint32 cluster, int32 value) argument 330 get_nth_fat_entry(nspace *vol, int32 cluster, uint32 n) argument 349 count_clusters(nspace *vol, int32 cluster) argument 384 clear_fat_chain(nspace *vol, uint32 cluster) argument 546 dump_fat_chain(nspace *vol, uint32 cluster) argument [all...] |
H A D | iter.c | 20 static int _validate_cs_(nspace *vol, uint32 cluster, uint32 sector) argument 24 if ((vol->fat_bits != 32) && IS_FIXED_ROOT(cluster)) { // fat12 or fat16 root 32 if (!IS_DATA_CLUSTER(cluster)) return -1; 40 ASSERT(_validate_cs_(csi->vol, csi->cluster, csi->sector) == 0); 41 if (_validate_cs_(csi->vol, csi->cluster, csi->sector) != 0) 44 if (IS_FIXED_ROOT(csi->cluster)) 48 (off_t)(csi->cluster - 2)* csi->vol->sectors_per_cluster + 52 int init_csi(nspace *vol, uint32 cluster, uint32 sector, struct csi *csi) argument 55 if ((ret = _validate_cs_(vol,cluster,sector)) != 0) 58 csi->vol = vol; csi->cluster 224 diri_init(nspace *vol, uint32 cluster, uint32 index, struct diri *diri) argument [all...] |
H A D | dlist.h | 12 vnode_id dlist_find(nspace *vol, uint32 cluster);
|
H A D | file.c | 37 /* simple cluster cache */ 41 uint32 cluster; member in struct:filecookie::__anon5696 59 if ((node->cluster != 0) && !IS_DATA_CLUSTER(node->cluster)) { 60 dprintf("write_vnode_entry called on invalid cluster (%lx)\n", node->cluster); 76 buffer[0x1a] = node->cluster & 0xff; // starting cluster 77 buffer[0x1b] = (node->cluster >> 8) & 0xff; 79 buffer[0x14] = (node->cluster >> 1 [all...] |
H A D | iter.h | 10 /* csi keeps track of current cluster and sector info */ 14 uint32 cluster; member in struct:csi 18 int init_csi(struct _nspace *vol, uint32 cluster, uint32 sector, struct csi *csi); 38 uint8 *diri_init(struct _nspace *vol, uint32 cluster, uint32 index, struct diri *diri);
|
H A D | dlist.c | 12 We don't worry about aliases for directories since their cluster values will 13 always be the same -- searches are performed only on the starting cluster 128 vnode_id dlist_find(nspace *vol, uint32 cluster) argument 132 DPRINTF(1, ("dlist_find cluster %lx\n", cluster)); 134 ASSERT(((cluster >= 2) && (cluster < vol->total_clusters + 2)) || (cluster == 1)); 142 if (CLUSTER_OF_DIR_CLUSTER_VNID(loc) == cluster) 146 DPRINTF(1, ("dlist_find cluster [all...] |
H A D | dir.c | 52 uint32 cluster; member in struct:_dirent_info_ 83 DPRINTF(2, ("_next_dirent_: %lx/%lx/%lx\n", iter->csi.cluster, iter->csi.sector, iter->current_index)); 191 oinfo->cluster = read16(buffer,0x1a); 193 oinfo->cluster += 0x10000*read16(buffer,0x14); 226 vnode_id loc = (IS_DATA_CLUSTER(info.cluster)) ? 227 GENERATE_DIR_CLUSTER_VNID(dir->vnid, info.cluster) : 253 if (dlist_find(vol, info.cluster) == -1LL) { 278 if (diri_init(vol, dir->cluster, 0, &iter) == NULL) { 374 diri_init(vol, dir->cluster, 0, &diri); 480 if (IS_FIXED_ROOT(dir->cluster)) 548 uint32 cluster; member in struct:_entry_info_ [all...] |
H A D | dosfs.c | 64 kprintf("bytes/sector = %lx, sectors/cluster = %lx, reserved sectors = %lx\n", 108 kprintf("iteration %lx, si=%lx, ei=%lx, cluster=%lx\n", 109 n->iteration, n->sindex, n->eindex, n->cluster); 112 kprintf("end cluster = %lx\n", n->end_cluster); 125 kprintf("dc2s nspace cluster\n"); 134 uint32 cluster = strtoul(argv[i], NULL, 0); local 135 kprintf("cluster %lx = block %Lx\n", cluster, vol->data_start + 136 (off_t)(cluster - 2) * vol->sectors_per_cluster); 257 dprintf("dosfs: sectors/cluster [all...] |
/haiku-fatelf/src/add-ons/kernel/file_systems/exfat/ |
H A D | DataStream.cpp | 51 cluster_t cluster = fInode->StartCluster(); local 53 cluster = fInode->NextCluster(cluster); 55 fVolume->ClusterToBlock(cluster, block); 58 cluster_t extentEnd = fInode->NextCluster(cluster); 59 if (extentEnd == EXFAT_CLUSTER_END || extentEnd == cluster + 1) 61 cluster = extentEnd; 63 *_length = min_c((cluster - clusterIndex + 1) * kClusterSize - offset, 65 TRACE("inode %" B_PRIdINO ": cluster %ld, pos %lld, %lld\n",
|
H A D | Volume.h | 18 cluster_t cluster; member in struct:node_key 47 if (key.cluster == node->key.cluster) { 52 return key.cluster < node->key.cluster ? -1 : 1; 132 status_t ClusterToBlock(cluster_t cluster, 135 Inode * FindInode(cluster_t cluster); 136 cluster_t NextCluster(cluster_t cluster); 137 ino_t GetIno(cluster_t cluster, uint32 offset, ino_t parent);
|
H A D | Volume.cpp | 419 Volume::ClusterToBlock(cluster_t cluster, fsblock_t &block) argument 421 block = ((cluster - 2) << SuperBlock().BlocksPerClusterShift()) 423 TRACE("Volume::ClusterToBlock() cluster %lu %u %lu: %llu, %lu\n", cluster, 437 cluster_t *cluster = (cluster_t *)block.SetTo(blockNum); local 438 cluster += _cluster % clusterPerBlock; 439 TRACE("Volume::NextCluster() cluster %lu next %lu\n", _cluster, *cluster); 440 return *cluster; 452 Volume::FindInode(cluster_t cluster) argument 459 GetIno(cluster_t cluster, uint32 offset, ino_t parent) argument [all...] |
H A D | Inode.cpp | 31 Inode::Inode(Volume* volume, cluster_t cluster, uint32 offset) argument 34 fID(volume->GetIno(cluster, offset, 0)), 35 fCluster(cluster), 71 fCluster = key->cluster; 75 TRACE("Inode::Inode(%" B_PRIdINO ") cluster %ld\n", ID(), Cluster()); 130 Inode::NextCluster(cluster_t cluster) const 133 return GetVolume()->NextCluster(cluster); 134 return cluster + 1;
|
/haiku-fatelf/src/system/boot/loader/file_systems/fat/ |
H A D | Stream.cpp | 49 fClusterMapCache[i].cluster = fVolume.InvalidClusterID(); 80 uint32 cluster = fFirstCluster; local 86 runs[i].block = fVolume.ToBlock(cluster); 89 next = fVolume.NextCluster(cluster); 90 if (next != cluster + 1) 96 cluster = next; 117 uint32 cluster = 0; 122 cluster = fClusterMapCache[i].cluster; 130 cluster 169 uint32 cluster = fFirstCluster; local 217 uint32 cluster; local 369 uint32 cluster; local [all...] |
H A D | Volume.h | 47 uint32 NextCluster(uint32 cluster, uint32 skip=0); 48 bool IsValidCluster(uint32 cluster) const; 49 bool IsLastCluster(uint32 cluster) const; 55 off_t ClusterToOffset(uint32 cluster) const; 62 status_t _UpdateCluster(uint32 cluster, uint32 value); 63 status_t _ClusterAllocated(uint32 cluster);
|
H A D | Volume.cpp | 98 TRACE(("%s: sect/cluster %d\n", __FUNCTION__, fSectorsPerCluster)); 104 TRACE(("%s: cluster shift %d\n", __FUNCTION__, fClusterShift)); 138 TRACE(("%s: block size %d, sector size %d, sectors/cluster %d\n", __FUNCTION__, 140 TRACE(("%s: block shift %d, sector shift %d, cluster shift %d\n", __FUNCTION__, 150 TRACE(("%s: found fat%d filesystem, root dir at cluster %d\n", __FUNCTION__, 192 Volume::ClusterToOffset(uint32 cluster) const 194 return (fDataStart << SectorShift()) + ((cluster - 2) << ClusterShift()); 198 Volume::NextCluster(uint32 cluster, uint32 skip) argument 200 //TRACE(("%s(%d, %d)\n", __FUNCTION__, cluster, skip)); 201 // lookup the FAT for next cluster i 317 _UpdateCluster(uint32 cluster, uint32 value) argument 365 _ClusterAllocated(uint32 cluster) argument [all...] |
H A D | File.cpp | 24 File::File(Volume &volume, off_t dirEntryOffset, uint32 cluster, off_t size, argument 28 fStream(volume, cluster, size, name),
|