Changeset 2b5d966 in mainline for uspace/lib/ext4/libext4_filesystem.c
- Timestamp:
- 2015-04-30T21:44:54Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- df2bce3
- Parents:
- bf1733d3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ext4/libext4_filesystem.c
rbf1733d3 r2b5d966 41 41 #include <ipc/vfs.h> 42 42 #include <align.h> 43 #include <crypto.h> 43 44 #include "libext4.h" 44 45 … … 54 55 enum cache_mode cmode) 55 56 { 57 int rc; 56 58 ext4_superblock_t *temp_superblock = NULL; 57 59 … … 59 61 60 62 /* Initialize block library (4096 is size of communication channel) */ 61 intrc = block_init(EXCHANGE_SERIALIZE, fs->device, 4096);63 rc = block_init(EXCHANGE_SERIALIZE, fs->device, 4096); 62 64 if (rc != EOK) 63 65 goto err; … … 140 142 /* Release memory space for superblock */ 141 143 free(fs->superblock); 142 144 143 145 /* Finish work with block library */ 144 146 block_cache_fini(fs->device); … … 532 534 /* If checksum not supported, 0 will be returned */ 533 535 uint16_t crc = 0; 534 536 535 537 /* Compute the checksum only if the filesystem supports it */ 536 538 if (ext4_superblock_has_feature_read_only(sb, … … 545 547 546 548 /* Initialization */ 547 crc = crc16 (~0, sb->uuid, sizeof(sb->uuid));549 crc = crc16_ibm(~0, sb->uuid, sizeof(sb->uuid)); 548 550 549 551 /* Include index of block group */ 550 crc = crc16 (crc, (uint8_t *) &le_group, sizeof(le_group));552 crc = crc16_ibm(crc, (uint8_t *) &le_group, sizeof(le_group)); 551 553 552 554 /* Compute crc from the first part (stop before checksum field) */ 553 crc = crc16 (crc, (uint8_t *) bg, offset);555 crc = crc16_ibm(crc, (uint8_t *) bg, offset); 554 556 555 557 /* Skip checksum */ … … 560 562 EXT4_FEATURE_INCOMPAT_64BIT)) && 561 563 (offset < ext4_superblock_get_desc_size(sb))) 562 crc = crc16 (crc, ((uint8_t *) bg) + offset,564 crc = crc16_ibm(crc, ((uint8_t *) bg) + offset, 563 565 ext4_superblock_get_desc_size(sb) - offset); 564 566 }
Note:
See TracChangeset
for help on using the changeset viewer.