Changeset 2eaf655 in mainline for uspace/app/mkminix/mkminix.c


Ignore:
Timestamp:
2011-07-22T18:26:37Z (13 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
365e5e08
Parents:
5f6168d
Message:

Add comments to the mkminix code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/mkminix/mkminix.c

    r5f6168d r2eaf655  
    275275}
    276276
     277/**Inserts the '.' and '..' directory entries in the root directory.
     278 *
     279 * @param sb            Pointer to the superblock structure.
     280 *
     281 * @return              EOK on success or a negative error code.
     282 */
    277283static int insert_dentries(const struct mfs_sb_info *sb)
    278284{
     
    322328}
    323329
     330/**Initialize the inode table.
     331 *
     332 * @param sb            Pointer to the superblock structure.
     333 *
     334 * @return              EOK on success or a negative error code.
     335 */
    324336static int init_inode_table(const struct mfs_sb_info *sb)
    325337{
     
    349361}
    350362
     363/**Initialize a V1 root inode.
     364 *
     365 * @param sb            Ponter to the superblock structure.
     366 *
     367 * @return              EOK on success or a negative error code.
     368 */
    351369static int make_root_ino(const struct mfs_sb_info *sb)
    352370{
     
    380398}
    381399
    382 /*Initialize a Minix V2 root inode on disk, also valid for V3 filesystem*/
     400/**Initialize a Minix V2 root inode on disk, also valid for V3 filesystem.
     401 *
     402 * @param sb            Pointer to the superblock structure.
     403 *
     404 * @return              EOK on success or a negative error code.
     405 */
    383406static int make_root_ino2(const struct mfs_sb_info *sb)
    384407{
     
    414437}
    415438
     439/**Initialize the superblock structure on disk.
     440 *
     441 * @param sb            Pointer to the superblock structure.
     442 *
     443 * @return              EOK on success or a negative error code.
     444 */
    416445static int init_superblock(struct mfs_sb_info *sb)
    417446{
     
    493522}
    494523
     524/**Write the V1/V2 superblock on disk.
     525 *
     526 * @param sbi           Pointer to the superblock structure to write on disk.
     527 *
     528 * @return              EOK on success or a negative error code.
     529 */
    495530static int write_superblock(const struct mfs_sb_info *sbi)
    496531{
     
    520555}
    521556
     557/**Write the V3s superblock on disk.
     558 *
     559 * @param sbi           Pointer to the superblock structure to write on disk.
     560 *
     561 * @return              EOK on success or a negative error code.
     562 */
    522563static int write_superblock3(const struct mfs_sb_info *sbi)
    523564{
     
    547588}
    548589
     590/**Initialize the inode and block bitmaps on disk.
     591 *
     592 * @param sb            Pointer to the superblock structure.
     593 *
     594 * @return              EOK on success or a negative error code.
     595 */
    549596static int init_bitmaps(const struct mfs_sb_info *sb)
    550597{
     
    596643}
    597644
     645/**Mark a bitmap entry as used or free.
     646 *
     647 * @param bmap          32-bit pointer to the bitmap in memory.
     648 * @param idx           The index in the bitmap of the bit to set at 1 or 0.
     649 * @param v             FREE to clear the bit, USED to set the bit.
     650 */
    598651static void mark_bmap(uint32_t *bmap, int idx, int v)
    599652{
     
    604657}
    605658
     659/**Write a block on disk.
     660 *
     661 * @param off           64-bit block offset on disk.
     662 * @param size          size of the block.
     663 * @param data          Pointer to the block content.
     664 *
     665 * @return              EOK on success or a negative error number.
     666 */
    606667static inline int write_block(aoff64_t off, size_t size, const void *data)
    607668{
Note: See TracChangeset for help on using the changeset viewer.