Changeset b84175a in mainline
- Timestamp:
- 2011-03-11T18:33:29Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 14c29ba
- Parents:
- 0dd2717
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/mkminix/mkminix.c
r0dd2717 rb84175a 97 97 static void mark_bmap(uint32_t *bmap, int idx, int v); 98 98 static int insert_dentries(const struct mfs_sb_info *sb); 99 100 static inline int write_1k_block(aoff64_t off, size_t size, const void *data); 99 101 100 102 static devmap_handle_t handle; … … 310 312 } 311 313 312 rc = block_write_direct(handle,root_dblock, 1, root_block);314 rc = write_1k_block(root_dblock, 1, root_block); 313 315 314 316 free(root_block); … … 338 340 339 341 for (i = 0; i < itable_size; ++i, ++itable_off) { 340 rc = block_write_direct(handle,itable_off, 1, itable_buf);342 rc = write_1k_block(itable_off, 1, itable_buf); 341 343 342 344 if (rc != EOK) … … 374 376 ino_buf[MFS_ROOT_INO].i_dzone[0] = sb->first_data_zone; 375 377 376 rc = block_write_direct(handle,itable_off, 1, ino_buf);378 rc = write_1k_block(itable_off, 1, ino_buf); 377 379 378 380 free(ino_buf); … … 411 413 ino_buf[MFS_ROOT_INO].i_dzone[0] = sb->first_data_zone; 412 414 413 rc = block_write_direct(handle,itable_off, 1, ino_buf);415 rc = write_1k_block(itable_off, 1, ino_buf); 414 416 415 417 free(ino_buf); … … 516 518 sb->s_state = MFS_VALID_FS; 517 519 518 rc = block_write_direct(handle,MFS_SUPERBLOCK, 1, sb);520 rc = write_1k_block(MFS_SUPERBLOCK, 1, sb); 519 521 free(sb); 520 522 … … 543 545 sb->s_disk_version = 3; 544 546 545 rc = block_write_direct(handle,MFS_SUPERBLOCK, 1, sb);547 rc = write_1k_block(MFS_SUPERBLOCK, 1, sb); 546 548 free(sb); 547 549 … … 583 585 584 586 for (i = 0; i < ibmap_nblocks; ++i) { 585 if ((rc = block_write_direct(handle,start_block + i,587 if ((rc = write_1k_block(start_block + i, 586 588 1, (ibmap_buf8 + i * MFS_BLOCKSIZE))) != EOK) 587 589 return rc; … … 591 593 592 594 for (i = 0; i < zbmap_nblocks; ++i) { 593 if ((rc = block_write_direct(handle,start_block + i,595 if ((rc = write_1k_block(start_block + i, 594 596 1, (zbmap_buf8 + i * MFS_BLOCKSIZE))) != EOK) 595 597 return rc; … … 608 610 else 609 611 bmap[idx / 32] |= 1 << (idx % 32); 612 } 613 614 static inline int write_1k_block(aoff64_t off, size_t size, const void *data) 615 { 616 return block_write_direct(handle, off * 2, size * 2, data); 610 617 } 611 618
Note:
See TracChangeset
for help on using the changeset viewer.