Changeset 9f95a80 in mainline
- Timestamp:
- 2008-10-27T14:25:24Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- beb17734
- Parents:
- 0ec862d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/fat/fat_fat.c
r0ec862d r9f95a80 54 54 static futex_t fat_alloc_lock = FUTEX_INITIALIZER; 55 55 56 /** Read block from file located on a FAT file system. 57 * 58 * @param bs Buffer holding the boot sector of the file system. 59 * @param dev_handle Device handle of the file system. 60 * @param firstc First cluster used by the file. Can be zero if the file 61 * is empty. 62 * @param offset Offset in blocks. 63 * 64 * @return Block structure holding the requested block. 65 */ 56 66 block_t * 57 67 _fat_block_get(fat_bs_t *bs, dev_handle_t dev_handle, fat_cluster_t firstc, … … 209 219 } 210 220 221 /** Mark cluster in one instance of FAT. 222 * 223 * @param bs Buffer holding the boot sector for the file system. 224 * @param dev_handle Device handle for the file system. 225 * @param fatno Number of the FAT instance where to make the change. 226 * @param clst Cluster which is to be marked. 227 * @param value Value mark the cluster with. 228 */ 211 229 void 212 230 fat_mark_cluster(fat_bs_t *bs, dev_handle_t dev_handle, unsigned fatno, … … 232 250 } 233 251 252 /** Replay the allocatoin of clusters in all shadow instances of FAT. 253 * 254 * @param bs Buffer holding the boot sector of the file system. 255 * @param dev_handle Device handle of the file system. 256 * @param lifo Chain of allocated clusters. 257 * @param nclsts Number of clusters in the lifo chain. 258 */ 234 259 void fat_alloc_shadow_clusters(fat_bs_t *bs, dev_handle_t dev_handle, 235 260 fat_cluster_t *lifo, unsigned nclsts) … … 246 271 } 247 272 273 /** Allocate clusters in FAT1. 274 * 275 * This function will attempt to allocate the requested number of clusters in 276 * the first FAT instance. The FAT will be altered so that the allocated 277 * clusters form an independent chain (i.e. a chain which does not belong to any 278 * file yet). 279 * 280 * @param bs Buffer holding the boot sector of the file system. 281 * @param dev_handle Device handle of the file system. 282 * @param nclsts Number of clusters to allocate. 283 * @param mcl Output parameter where the first cluster in the chain 284 * will be returned. 285 * @param lcl Output parameter where the last cluster in the chain 286 * will be returned. 287 * 288 * @return EOK on success, a negative error code otherwise. 289 */ 248 290 int 249 291 fat_alloc_clusters(fat_bs_t *bs, dev_handle_t dev_handle, unsigned nclsts, … … 315 357 } 316 358 359 /** Append a cluster chain to the last file cluster in all FATs. 360 * 361 * @param bs Buffer holding boot sector of the file system. 362 * @param nodep Node representing the file. 363 * @param mcl First cluster of the cluster chain to append. 364 */ 317 365 void fat_append_clusters(fat_bs_t *bs, fat_node_t *nodep, fat_cluster_t mcl) 318 366 {
Note:
See TracChangeset
for help on using the changeset viewer.