Changeset 9f95a80 in mainline


Ignore:
Timestamp:
2008-10-27T14:25:24Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
beb17734
Parents:
0ec862d
Message:

Add comments to functions in fat_fat.c.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/fat/fat_fat.c

    r0ec862d r9f95a80  
    5454static futex_t fat_alloc_lock = FUTEX_INITIALIZER;
    5555
     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 */
    5666block_t *
    5767_fat_block_get(fat_bs_t *bs, dev_handle_t dev_handle, fat_cluster_t firstc,
     
    209219}
    210220
     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 */
    211229void
    212230fat_mark_cluster(fat_bs_t *bs, dev_handle_t dev_handle, unsigned fatno,
     
    232250}
    233251
     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 */
    234259void fat_alloc_shadow_clusters(fat_bs_t *bs, dev_handle_t dev_handle,
    235260    fat_cluster_t *lifo, unsigned nclsts)
     
    246271}
    247272
     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 */
    248290int
    249291fat_alloc_clusters(fat_bs_t *bs, dev_handle_t dev_handle, unsigned nclsts,
     
    315357}
    316358
     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 */
    317365void fat_append_clusters(fat_bs_t *bs, fat_node_t *nodep, fat_cluster_t mcl)
    318366{
Note: See TracChangeset for help on using the changeset viewer.