Explorar o código

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

branzhu %!s(int64=9) %!d(string=hai) anos
pai
achega
fb46550c54
Modificáronse 3 ficheiros con 4 adicións e 4 borrados
  1. 2 2
      include/ext4.h
  2. 1 1
      src/ext4_extent.c
  3. 1 1
      src/ext4_fs.c

+ 2 - 2
include/ext4.h

@@ -227,13 +227,13 @@ int ext4_get_sblock(const char *mount_point, struct ext4_sblock **sb);
  * @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

+ 1 - 1
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))
 

+ 1 - 1
src/ext4_fs.c

@@ -456,7 +456,7 @@ static int ext4_fs_init_inode_table(struct ext4_block_group_ref *bg_ref)
 		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;
 	}