shithub: lwext4

Download patch

ref: 650f1026e4d9195335d0644e63456cf9ea87a6e2
parent: 98017fc763a9ca07da72048c66ce11089ecb4750
author: gkostka <kostka.grzegorz@gmail.com>
date: Sun Jun 28 05:22:35 EDT 2015

Fix comment typos

--- a/lwext4/ext4_balloc.c
+++ b/lwext4/ext4_balloc.c
@@ -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 @@
         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));
--- a/lwext4/ext4_bcache.h
+++ b/lwext4/ext4_bcache.h
@@ -42,9 +42,9 @@
 #include <stdint.h>
 #include <stdbool.h>
 
-/**@brief   Single block descriptor.*/
+/**@brief   Single block descriptor*/
 struct ext4_block {
-    /**@brief   Dirty flag.*/
+    /**@brief   Dirty flag*/
     bool dirty;
 
     /**@brief   Logical block ID*/
@@ -57,7 +57,7 @@
     uint8_t *data;
 };
 
-/**@brief   Block cache descriptor.*/
+/**@brief   Block cache descriptor*/
 struct ext4_bcache {
 
     /**@brief   Item count in block cache*/
@@ -66,25 +66,25 @@
     /**@brief   Item size in block cache*/
     uint32_t itemsize;
 
-    /**@brief   Last recently used counter.*/
+    /**@brief   Last recently used counter*/
     uint32_t lru_ctr;
 
-    /**@brief   Reference count table (cnt).*/
+    /**@brief   Reference count table*/
     uint32_t refctr[CONFIG_BLOCK_DEV_CACHE_SIZE];
 
-    /**@brief   Last recently used ID table (cnt)*/
+    /**@brief   Last recently used ID table*/
     uint32_t lru_id[CONFIG_BLOCK_DEV_CACHE_SIZE];
 
-    /**@brief   Writeback free delay mode table (cnt)*/
+    /**@brief   Writeback free delay mode table*/
     uint8_t free_delay[CONFIG_BLOCK_DEV_CACHE_SIZE];
 
-    /**@brief   Logical block table (cnt).*/
+    /**@brief   Logical block table*/
     uint64_t lba[CONFIG_BLOCK_DEV_CACHE_SIZE];
 
-    /**@brief   Dirty mark (cnt).*/
+    /**@brief   Dirty mark*/
     bool dirty[CONFIG_BLOCK_DEV_CACHE_SIZE];
 
-    /**@brief   Cache data buffers (cnt * itemsize)*/
+    /**@brief   Cache data buffers*/
     uint8_t *data;
 
     /**@brief   Currently referenced datablocks*/
--- a/lwext4/ext4_blockdev.c
+++ b/lwext4/ext4_blockdev.c
@@ -138,7 +138,7 @@
             /*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 @@
     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 @@
     /*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 @@
             /*No delayed anymore*/
             bdev->bc->free_delay[i] = 0;
 
-            /*Reduce refered block count*/
+            /*Reduce reference counter*/
             bdev->bc->ref_blocks--;
         }
     }
--- a/lwext4/ext4_blockdev.h
+++ b/lwext4/ext4_blockdev.h
@@ -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 @@
     /**@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 @@
     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 @@
 
 /**@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 @@
 /**@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_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);
 
--- a/lwext4/ext4_config.h
+++ b/lwext4/ext4_config.h
@@ -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
@@ -122,12 +122,12 @@
 #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
--- a/lwext4/ext4_debug.h
+++ b/lwext4/ext4_debug.h
@@ -100,7 +100,7 @@
 #endif
 
 #if CONFIG_DEBUG_ASSERT
-/**@brief   Debug asseration.*/
+/**@brief   Debug assertion.*/
 #define ext4_assert(_v)                                                        \
     do {                                                                       \
         if (!(_v)) {                                                           \
--- a/lwext4/ext4_dir.c
+++ b/lwext4/ext4_dir.c
@@ -124,7 +124,7 @@
     uint64_t next_block_idx = pos / block_size;
 
     /*
-     * If we don't have a block or are moving accross block boundary,
+     * If we don't have a block or are moving across block boundary,
      * we need to get another block
      */
     if ((it->current_block.lb_id == 0) ||
@@ -519,7 +519,7 @@
 
         /* Valid entry - check it */
         if (dentry->inode != 0) {
-            /* For more effectivity compare firstly only lengths */
+            /* For more efficient compare only lengths firstly*/
             if (ext4_dir_entry_ll_get_name_length(sb, dentry) == name_len) {
                 /* Compare names */
                 if (memcmp((uint8_t *)name, dentry->name, name_len) == 0) {
--- a/lwext4/ext4_dir_idx.c
+++ b/lwext4/ext4_dir_idx.c
@@ -444,7 +444,7 @@
  * @param hash      Hash value to check
  * @param dx_block  Current block
  * @param dx_blocks Array with path from root to leaf node
- * @return Standard Error codee
+ * @return Standard Error code
  */
 static int ext4_dir_dx_next_block(struct ext4_inode_ref *inode_ref,
                                   uint32_t hash,
@@ -470,7 +470,7 @@
         p--;
     }
 
-    /* Check hash collision (if not occured - no next block cannot be used)*/
+    /* Check hash collision (if not occurred - no next block cannot be used)*/
     uint32_t current_hash = ext4_dir_dx_entry_get_hash(p->position);
     if ((hash & 1) == 0) {
         if ((current_hash & ~1) != hash)
--- a/lwext4/ext4_extent.c
+++ b/lwext4/ext4_extent.c
@@ -664,7 +664,7 @@
 
             path_ptr->block.dirty = true;
 
-            /* Jump to the preceeding item */
+            /* Jump to the preceding item */
             path_ptr--;
         } else {
             /* Node with free space */
--- a/lwext4/ext4_fs.c
+++ b/lwext4/ext4_fs.c
@@ -837,7 +837,7 @@
     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;
 
--- a/lwext4/ext4_inode.h
+++ b/lwext4/ext4_inode.h
@@ -140,7 +140,7 @@
  */
 uint32_t ext4_inode_get_gid(struct ext4_inode *inode);
 
-/**@brief Set ID ot the i-node owner's group.
+/**@brief Set ID to the i-node owner's group.
  * @param inode I-node to set gid to
  * @param gid   Group ID of the i-node owner
  */
--- a/lwext4/ext4_super.h
+++ b/lwext4/ext4_super.h
@@ -185,23 +185,23 @@
 
 /**@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);
--- a/lwext4/ext4_types.h
+++ b/lwext4/ext4_types.h
@@ -68,7 +68,7 @@
     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 @@
 
 /*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