Fix comment typos
authorgkostka <kostka.grzegorz@gmail.com>
Sun, 28 Jun 2015 07:22:35 +0000 (09:22 +0200)
committergkostka <kostka.grzegorz@gmail.com>
Sun, 28 Jun 2015 07:22:35 +0000 (09:22 +0200)
13 files changed:
lwext4/ext4_balloc.c
lwext4/ext4_bcache.h
lwext4/ext4_blockdev.c
lwext4/ext4_blockdev.h
lwext4/ext4_config.h
lwext4/ext4_debug.h
lwext4/ext4_dir.c
lwext4/ext4_dir_idx.c
lwext4/ext4_extent.c
lwext4/ext4_fs.c
lwext4/ext4_inode.h
lwext4/ext4_super.h
lwext4/ext4_types.h

index 2297c2f7eafd89bbfde2abbddcb6bf55ac386a45..0c395be7a05b98703e8722056bd320c5898f8a92 100644 (file)
@@ -48,7 +48,7 @@
 #include "ext4_inode.h"
 
 /**@brief Compute number of block group from block address.
- * @param sb         Superblock pointer.
+ * @param sb superblock pointer.
  * @param baddr Absolute address of block.
  * @return Block group index
  */
@@ -171,7 +171,7 @@ int ext4_balloc_free_blocks(struct ext4_inode_ref *inode_ref, uint32_t first,
         ext4_balloc_get_bgid_of_block(sb, first + count - 1);
 
     if (!ext4_sb_has_feature_incompatible(sb, EXT4_FEATURE_INCOMPAT_FLEX_BG)) {
-        /*It is not possible withot flex_bg that blocks are continuous
+        /*It is not possible without flex_bg that blocks are continuous
          * and and last block belongs to other bg.*/
         ext4_assert(block_group_first ==
                     ext4_balloc_get_bgid_of_block(sb, first + count - 1));
index 7454e20bbf898a015f2eb6fa4892562a11cc6e81..b2573c52a6bf32bd237c9a498602519371985fa2 100644 (file)
@@ -42,9 +42,9 @@
 #include <stdint.h>\r
 #include <stdbool.h>\r
 \r
-/**@brief   Single block descriptor.*/\r
+/**@brief   Single block descriptor*/\r
 struct ext4_block {\r
-    /**@brief   Dirty flag.*/\r
+    /**@brief   Dirty flag*/\r
     bool dirty;\r
 \r
     /**@brief   Logical block ID*/\r
@@ -57,7 +57,7 @@ struct ext4_block {
     uint8_t *data;\r
 };\r
 \r
-/**@brief   Block cache descriptor.*/\r
+/**@brief   Block cache descriptor*/\r
 struct ext4_bcache {\r
 \r
     /**@brief   Item count in block cache*/\r
@@ -66,25 +66,25 @@ struct ext4_bcache {
     /**@brief   Item size in block cache*/\r
     uint32_t itemsize;\r
 \r
-    /**@brief   Last recently used counter.*/\r
+    /**@brief   Last recently used counter*/\r
     uint32_t lru_ctr;\r
 \r
-    /**@brief   Reference count table (cnt).*/\r
+    /**@brief   Reference count table*/\r
     uint32_t refctr[CONFIG_BLOCK_DEV_CACHE_SIZE];\r
 \r
-    /**@brief   Last recently used ID table (cnt)*/\r
+    /**@brief   Last recently used ID table*/\r
     uint32_t lru_id[CONFIG_BLOCK_DEV_CACHE_SIZE];\r
 \r
-    /**@brief   Writeback free delay mode table (cnt)*/\r
+    /**@brief   Writeback free delay mode table*/\r
     uint8_t free_delay[CONFIG_BLOCK_DEV_CACHE_SIZE];\r
 \r
-    /**@brief   Logical block table (cnt).*/\r
+    /**@brief   Logical block table*/\r
     uint64_t lba[CONFIG_BLOCK_DEV_CACHE_SIZE];\r
 \r
-    /**@brief   Dirty mark (cnt).*/\r
+    /**@brief   Dirty mark*/\r
     bool dirty[CONFIG_BLOCK_DEV_CACHE_SIZE];\r
 \r
-    /**@brief   Cache data buffers (cnt * itemsize)*/\r
+    /**@brief   Cache data buffers*/\r
     uint8_t *data;\r
 \r
     /**@brief   Currently referenced datablocks*/\r
index 82296d5c38cd477f60bd7d7480a9728b0c2fcaf2..56b4c34fd61df867ab474cb4e88b6da919b2763b 100644 (file)
@@ -138,7 +138,7 @@ int ext4_block_get(struct ext4_blockdev *bdev, struct ext4_block *b,
             /*No delayed anymore*/
             bdev->bc->free_delay[free_candidate] = 0;
 
-            /*Reduce refered block count*/
+            /*Reduce reference counter*/
             bdev->bc->ref_blocks--;
         }
     }
@@ -181,7 +181,7 @@ int ext4_block_set(struct ext4_blockdev *bdev, struct ext4_block *b)
     if (!(bdev->flags & EXT4_BDEV_INITIALIZED))
         return EIO;
 
-    /*Doesn,t need to write.*/
+    /*No need to write.*/
     if (!b->dirty && !bdev->bc->dirty[b->cache_id]) {
         ext4_bcache_free(bdev->bc, b, 0);
         return EOK;
@@ -190,7 +190,7 @@ int ext4_block_set(struct ext4_blockdev *bdev, struct ext4_block *b)
     /*Free cache delay mode*/
     if (bdev->cache_write_back) {
 
-        /*Free cahe block and mark as free delayed*/
+        /*Free cache block and mark as free delayed*/
         return ext4_bcache_free(bdev->bc, b, bdev->cache_write_back);
     }
 
@@ -419,7 +419,7 @@ int ext4_block_cache_write_back(struct ext4_blockdev *bdev, uint8_t on_off)
             /*No delayed anymore*/
             bdev->bc->free_delay[i] = 0;
 
-            /*Reduce refered block count*/
+            /*Reduce reference counter*/
             bdev->bc->ref_blocks--;
         }
     }
index 558a382b3fc42511a0cd92aafe10b2da6d9e5e39..59ba2b685cd6df6364f1e6663e6de17b2e043a08 100644 (file)
@@ -46,7 +46,7 @@
 /**@brief   Initialization status flag*/
 #define EXT4_BDEV_INITIALIZED (1 << 0)
 
-/**@brief   Definiton of the simple block device.*/
+/**@brief   Definition of the simple block device.*/
 struct ext4_blockdev {
 
     /**@brief   Open device function
@@ -78,22 +78,22 @@ struct ext4_blockdev {
     /**@brief   Block size (bytes): physical*/
     uint32_t ph_bsize;
 
-    /**@brief   Block count: physical.*/
+    /**@brief   Block count: physical*/
     uint64_t ph_bcnt;
 
-    /**@brief   Block size buffer: physical.*/
+    /**@brief   Block size buffer: physical*/
     uint8_t *ph_bbuf;
 
     /**@brief   Block size (bytes) logical*/
     uint32_t lg_bsize;
 
-    /**@brief   Block count: phisical.*/
+    /**@brief   Block count: physical*/
     uint64_t lg_bcnt;
 
-    /**@brief   Flags of te block device.*/
+    /**@brief   Flags of block device*/
     uint32_t flags;
 
-    /**@brief   Cache write back mode refference counter.*/
+    /**@brief   Cache write back mode reference counter*/
     uint32_t cache_write_back;
 
     /**@brief   Physical read counter*/
@@ -103,7 +103,7 @@ struct ext4_blockdev {
     uint32_t bwrite_ctr;
 };
 
-/**@brief   Static initialization fo the block device.*/
+/**@brief   Static initialization of the block device.*/
 #define EXT4_BLOCKDEV_STATIC_INSTANCE(__name, __bsize, __bcnt, __open,         \
                                       __bread, __bwrite, __close)              \
     static uint8_t __name##_ph_bbuf[(__bsize)];                                \
@@ -137,7 +137,7 @@ int ext4_block_fini(struct ext4_blockdev *bdev);
 
 /**@brief   Set logical block size in block device.
  * @param   bdev block device descriptor
- * @param   lb_size ligical block size (in bytes)
+ * @param   lb_size logical block size (in bytes)
  * @return  standard error code*/
 void ext4_block_set_lb_size(struct ext4_blockdev *bdev, uint64_t lb_bsize);
 
@@ -158,7 +158,7 @@ int ext4_block_set(struct ext4_blockdev *bdev, struct ext4_block *b);
 /**@brief   Block read procedure (without cache)
  * @param   bdev block device descriptor
  * @param   buf output buffer
- * @param   lba logical block adderss
+ * @param   lba logical block address
  * @return  standard error code*/
 int ext4_blocks_get_direct(struct ext4_blockdev *bdev, void *buf, uint64_t lba,
                            uint32_t cnt);
@@ -171,21 +171,21 @@ int ext4_blocks_get_direct(struct ext4_blockdev *bdev, void *buf, uint64_t lba,
 int ext4_blocks_set_direct(struct ext4_blockdev *bdev, const void *buf,
                            uint64_t lba, uint32_t cnt);
 
-/**@brief   Write to block device (by direct adress).
+/**@brief   Write to block device (by direct address).
  * @param   bdev block device descriptor
  * @param   off byte offset in block device
  * @param   buf input buffer
- * @param   len length of the write nuffer
- * @return  EOK when sucess*/
+ * @param   len length of the write buffer
+ * @return  standard error code*/
 int ext4_block_writebytes(struct ext4_blockdev *bdev, uint64_t off,
                           const void *buf, uint32_t len);
 
-/**@brief   Read freom block device (by direct adress).
+/**@brief   Read freom block device (by direct address).
  * @param   bdev block device descriptor
  * @param   off byte offset in block device
  * @param   buf input buffer
- * @param   len length of the write nuffer
- * @return  EOK when sucess*/
+ * @param   len length of the write buffer
+ * @return  standard error code*/
 int ext4_block_readbytes(struct ext4_blockdev *bdev, uint64_t off, void *buf,
                          uint32_t len);
 
index ff864e63264d3fb3a2ac99a6df2979165049615b..b68785fd8f7d3a7d9421a68de09d3f36522f3c33 100644 (file)
@@ -97,7 +97,7 @@
 #define CONFIG_DIR_INDEX_COMB_SORT 1
 #endif
 
-/**@brief   Include error codes from ext4_errno or sandard library.*/
+/**@brief   Include error codes from ext4_errno or standard library.*/
 #ifndef CONFIG_HAVE_OWN_ERRNO
 #define CONFIG_HAVE_OWN_ERRNO 1
 #endif
 #define CONFIG_BLOCK_DEV_CACHE_SIZE 8
 #endif
 
-/**@brief   Ilosc urzadzen blokowych.*/
+/**@brief   Maximum block device count*/
 #ifndef CONFIG_EXT4_BLOCKDEVS_COUNT
 #define CONFIG_EXT4_BLOCKDEVS_COUNT 2
 #endif
 
-/**@brief   Ilosc punktow montowania systemu plikow*/
+/**@brief   Maximum mountpoint count*/
 #ifndef CONFIG_EXT4_MOUNTPOINTS_COUNT
 #define CONFIG_EXT4_MOUNTPOINTS_COUNT 2
 #endif
index 61b4653b6ef4e9df5c74fb35e444269f6e654e34..868e7da2feed024a8b48fe2911ee9aad245eadc7 100644 (file)
@@ -100,7 +100,7 @@ uint32_t ext4_dmask_get(void);
 #endif
 
 #if CONFIG_DEBUG_ASSERT
-/**@brief   Debug asseration.*/
+/**@brief   Debug assertion.*/
 #define ext4_assert(_v)                                                        \
     do {                                                                       \
         if (!(_v)) {                                                           \
index fd043b56dab161cc1b626aa929b01b5f6b5202f1..47c699a8e8a564fe7b4862f578e53d476a101f52 100644 (file)
@@ -124,7 +124,7 @@ static int ext4_dir_iterator_seek(struct ext4_directory_iterator *it,
     uint64_t next_block_idx = pos / block_size;\r
 \r
     /*\r
-     * If we don't have a block or are moving accross block boundary,\r
+     * If we don't have a block or are moving across block boundary,\r
      * we need to get another block\r
      */\r
     if ((it->current_block.lb_id == 0) ||\r
@@ -519,7 +519,7 @@ int ext4_dir_find_in_block(struct ext4_block *block, struct ext4_sblock *sb,
 \r
         /* Valid entry - check it */\r
         if (dentry->inode != 0) {\r
-            /* For more effectivity compare firstly only lengths */\r
+            /* For more efficient compare only lengths firstly*/\r
             if (ext4_dir_entry_ll_get_name_length(sb, dentry) == name_len) {\r
                 /* Compare names */\r
                 if (memcmp((uint8_t *)name, dentry->name, name_len) == 0) {\r
index 1c174fa2affd2cede55c2a49a8cf099c050703c9..b35bb637dc41390fee313192123e234926992ef2 100644 (file)
@@ -444,7 +444,7 @@ static int ext4_dir_dx_get_leaf(struct ext4_hash_info *hinfo,
  * @param hash      Hash value to check\r
  * @param dx_block  Current block\r
  * @param dx_blocks Array with path from root to leaf node\r
- * @return Standard Error codee\r
+ * @return Standard Error code\r
  */\r
 static int ext4_dir_dx_next_block(struct ext4_inode_ref *inode_ref,\r
                                   uint32_t hash,\r
@@ -470,7 +470,7 @@ static int ext4_dir_dx_next_block(struct ext4_inode_ref *inode_ref,
         p--;\r
     }\r
 \r
-    /* Check hash collision (if not occured - no next block cannot be used)*/\r
+    /* Check hash collision (if not occurred - no next block cannot be used)*/\r
     uint32_t current_hash = ext4_dir_dx_entry_get_hash(p->position);\r
     if ((hash & 1) == 0) {\r
         if ((current_hash & ~1) != hash)\r
index 2869c8558396789dae0472af64ce228b76e34beb..9b86a5ccd686d81cd0f3b5822d17abfdeb9a2a36 100644 (file)
@@ -664,7 +664,7 @@ static int ext4_extent_append_extent(struct ext4_inode_ref *inode_ref,
 \r
             path_ptr->block.dirty = true;\r
 \r
-            /* Jump to the preceeding item */\r
+            /* Jump to the preceding item */\r
             path_ptr--;\r
         } else {\r
             /* Node with free space */\r
index 398e87ad594215d393a856dc1ab925b1fbf9a792..76580843d7a8b4bd29fefb7856a35d3d58ed9578 100644 (file)
@@ -837,7 +837,7 @@ int ext4_fs_truncate_inode(struct ext4_inode_ref *inode_ref, uint64_t new_size)
     if (old_size == new_size)
         return EOK;
 
-    /* It's not suppported to make the larger file by truncate operation */
+    /* It's not supported to make the larger file by truncate operation */
     if (old_size < new_size)
         return EINVAL;
 
index 88af086795794df4172f089b89b95781d466ca08..c0a79caeb83eacc28d6b15b198e098d9c40e1db3 100644 (file)
@@ -140,7 +140,7 @@ void ext4_inode_set_deletion_time(struct ext4_inode *inode, uint32_t time);
  */\r
 uint32_t ext4_inode_get_gid(struct ext4_inode *inode);\r
 \r
-/**@brief Set ID ot the i-node owner's group.\r
+/**@brief Set ID to the i-node owner's group.\r
  * @param inode I-node to set gid to\r
  * @param gid   Group ID of the i-node owner\r
  */\r
index 14b14a07f071b4822f66ef399971fff1719b96ec..1852b488b79b1371842503c944223175f4e551d7 100644 (file)
@@ -185,23 +185,23 @@ uint32_t ext4_inodes_in_group_cnt(struct ext4_sblock *s, uint32_t bgid);
 
 /**@brief   Superblock write.
  * @param   bdev block device descriptor.
- * @param   s superblock descruptor
+ * @param   s superblock descriptor
  * @return  Standard error code */
 int ext4_sb_write(struct ext4_blockdev *bdev, struct ext4_sblock *s);
 
 /**@brief   Superblock read.
  * @param   bdev block device descriptor.
- * @param   s superblock descruptor
+ * @param   s superblock descriptor
  * @return  Standard error code */
 int ext4_sb_read(struct ext4_blockdev *bdev, struct ext4_sblock *s);
 
 /**@brief   Superblock simple validation.
- * @param   s superblock dsecriptor
+ * @param   s superblock descriptor
  * @return  true if OK*/
 bool ext4_sb_check(struct ext4_sblock *s);
 
 /**@brief   Superblock presence in block group.
- * @param   s superblock dsecriptor
+ * @param   s superblock descriptor
  * @param   block_group block group id
  * @return  true if block group has superblock*/
 bool ext4_sb_is_super_in_bg(struct ext4_sblock *s, uint32_t block_group);
index 387948c876e9bc390307b388688e9a563667e823..953a70a5a61e2e4600d11bba0b1f4d9011dc7f78 100644 (file)
@@ -68,7 +68,7 @@ struct ext4_sblock {
     uint16_t max_mount_count;          /* Maximal mount count */
     uint16_t magic;                    /* Magic signature */
     uint16_t state;                    /* File system state */
-    uint16_t errors;                   /* Behaviour when detecting errors */
+    uint16_t errors;                   /* Behavior when detecting errors */
     uint16_t minor_rev_level;          /* Minor revision level */
     uint32_t last_check_time;          /* Time of last check */
     uint32_t check_interval;           /* Maximum time between checks */
@@ -261,8 +261,8 @@ struct ext4_sblock {
 
 /*Ignored features:
  * RECOVER - journaling in lwext4 is not supported
- *           (probably won,t be ever...)
- * MMP - multi mout protection (impossible scenario)
+ *           (probably won't be ever...)
+ * MMP - multi-mout protection (impossible scenario)
  * */
 #define FEATURE_INCOMPAT_IGNORED                                               \
     EXT4_FEATURE_INCOMPAT_RECOVER | EXT4_FEATURE_INCOMPAT_MMP