Changeset 4a3a5a0 in mainline for uspace/lib/ext4/src/superblock.c
- Timestamp:
- 2025-01-29T14:02:50Z (3 weeks ago)
- Children:
- f455de0
- Parents:
- ea50e671
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ext4/src/superblock.c
rea50e671 r4a3a5a0 1231 1231 /* Preserve physical block data */ 1232 1232 rc = block_read_direct(service_id, first_block, 1, tmp_sb); 1233 if (rc != EOK) { 1234 free(tmp_sb); 1235 return rc; 1233 if (rc == EOK) { 1234 /* Write the superblock */ 1235 void *sb_pos = tmp_sb + EXT4_SUPERBLOCK_OFFSET % phys_block_size; 1236 memcpy(sb_pos, sb, EXT4_SUPERBLOCK_SIZE); 1237 1238 /* Write physical block to device */ 1239 rc = block_write_direct(service_id, first_block, 1, tmp_sb); 1236 1240 } 1237 1241 1238 /* Write the superblock */1239 void *sb_pos = tmp_sb + EXT4_SUPERBLOCK_OFFSET % phys_block_size;1240 memcpy(sb_pos, sb, EXT4_SUPERBLOCK_SIZE);1241 1242 /* Write physical block to device */1243 rc = block_write_direct(service_id, first_block, 1, tmp_sb);1244 1242 free(tmp_sb); 1245 1243 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.