shithub: lwext4

Download patch

ref: fb46550c54e6efbcd5ceb7f86d88e89ca9f1cee3
parent: 7e9fa5accf413deb040daca7cfd7844edb5cf58b
author: branzhu <[email protected]>
date: Thu Jul 13 06:48:43 EDT 2017

Fix a compile issue with big endian config & some small issues fixes

--- a/include/ext4.h
+++ b/include/ext4.h
@@ -227,13 +227,13 @@
  * @warning Default model of cache is write trough. It means that when You do:
  *
  *          ext4_fopen(...);
- *          ext4_fwrie(...);
+ *          ext4_fwrite(...);
  *                           < --- data is flushed to physical drive
  *
  *          When you do:
  *          ext4_cache_write_back(..., 1);
  *          ext4_fopen(...);
- *          ext4_fwrie(...);
+ *          ext4_fwrite(...);
  *                           < --- data is NOT flushed to physical drive
  *          ext4_cache_write_back(..., 0);
  *                           < --- when write back mode is disabled all
--- a/src/ext4_extent.c
+++ b/src/ext4_extent.c
@@ -45,7 +45,7 @@
 
 #define EXT4_EXT_GET_LEN(ex) to_le16((ex)->block_count)
 #define EXT4_EXT_GET_LEN_UNWRITTEN(ex) \
-    (EXT4_EXT_GET_LEN(ex) &= ~(EXT4_EXT_UNWRITTEN_MASK))
+    (EXT4_EXT_GET_LEN(ex) & ~(EXT4_EXT_UNWRITTEN_MASK))
 #define EXT4_EXT_SET_LEN(ex, count) \
     ((ex)->block_count = to_le16(count))
 
--- a/src/ext4_fs.c
+++ b/src/ext4_fs.c
@@ -456,7 +456,7 @@
 		memset(b.data, 0, block_size);
 		ext4_trans_set_block_dirty(b.buf);
 
-		ext4_block_set(bg_ref->fs->bdev, &b);
+		rc = ext4_block_set(bg_ref->fs->bdev, &b);
 		if (rc != EOK)
 			return rc;
 	}