Changeset e33100c in mainline
- Timestamp:
- 2011-04-09T12:58:38Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e666ddc
- Parents:
- 534d08e8
- Location:
- uspace
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/mkminix/mkminix.c
r534d08e8 re33100c 366 366 memset(ino_buf, 0x00, MFS_BLOCKSIZE); 367 367 368 ino_buf[MFS_ROOT_INO].i_mode = S_IFDIR; 369 ino_buf[MFS_ROOT_INO].i_uid = 0; 370 ino_buf[MFS_ROOT_INO].i_gid = 0; 371 ino_buf[MFS_ROOT_INO].i_size = (sb->longnames ? MFSL_DIRSIZE : MFS_DIRSIZE) * 2; 372 ino_buf[MFS_ROOT_INO].i_mtime = sec; 373 ino_buf[MFS_ROOT_INO].i_nlinks = 2; 374 ino_buf[MFS_ROOT_INO].i_dzone[0] = sb->first_data_zone; 368 ino_buf[MFS_ROOT_INO - 1].i_mode = S_IFDIR; 369 ino_buf[MFS_ROOT_INO - 1].i_uid = 0; 370 ino_buf[MFS_ROOT_INO - 1].i_gid = 0; 371 ino_buf[MFS_ROOT_INO - 1].i_size = (sb->longnames ? MFSL_DIRSIZE : 372 MFS_DIRSIZE) * 2; 373 ino_buf[MFS_ROOT_INO - 1].i_mtime = sec; 374 ino_buf[MFS_ROOT_INO - 1].i_nlinks = 2; 375 ino_buf[MFS_ROOT_INO - 1].i_dzone[0] = sb->first_data_zone; 375 376 376 377 rc = write_block(itable_off, 1, ino_buf); … … 398 399 memset(ino_buf, 0x00, sb->block_size); 399 400 400 ino_buf[MFS_ROOT_INO ].i_mode = S_IFDIR;401 ino_buf[MFS_ROOT_INO ].i_uid = 0;402 ino_buf[MFS_ROOT_INO ].i_gid = 0;403 ino_buf[MFS_ROOT_INO ].i_size = MFS3_DIRSIZE * 2;404 ino_buf[MFS_ROOT_INO ].i_mtime = sec;405 ino_buf[MFS_ROOT_INO ].i_atime = sec;406 ino_buf[MFS_ROOT_INO ].i_ctime = sec;407 ino_buf[MFS_ROOT_INO ].i_nlinks = 2;408 ino_buf[MFS_ROOT_INO ].i_dzone[0] = sb->first_data_zone;401 ino_buf[MFS_ROOT_INO - 1].i_mode = S_IFDIR; 402 ino_buf[MFS_ROOT_INO - 1].i_uid = 0; 403 ino_buf[MFS_ROOT_INO - 1].i_gid = 0; 404 ino_buf[MFS_ROOT_INO - 1].i_size = MFS3_DIRSIZE * 2; 405 ino_buf[MFS_ROOT_INO - 1].i_mtime = sec; 406 ino_buf[MFS_ROOT_INO - 1].i_atime = sec; 407 ino_buf[MFS_ROOT_INO - 1].i_ctime = sec; 408 ino_buf[MFS_ROOT_INO - 1].i_nlinks = 2; 409 ino_buf[MFS_ROOT_INO - 1].i_dzone[0] = sb->first_data_zone; 409 410 410 411 rc = write_block(itable_off, 1, ino_buf); … … 564 565 memset(zbmap_buf, 0xFF, zbmap_nblocks * sb->block_size); 565 566 566 for (i = 2; i < sb->n_inodes ; ++i)567 for (i = 2; i < sb->n_inodes + 1; ++i) 567 568 mark_bmap(ibmap_buf, i, FREE); 568 569 -
uspace/srv/fs/minixfs/mfs_inode.c
r534d08e8 re33100c 82 82 sbi = instance->sbi; 83 83 assert(sbi); 84 84 85 /*inode 0 does not exist*/ 86 inum -= 1; 87 85 88 const int ino_off = inum % sbi->ino_per_block; 86 89 const size_t ino_size = sizeof(struct mfs_inode); … … 146 149 sbi = instance->sbi; 147 150 assert(sbi); 151 152 /*inode 0 does not exist*/ 153 inum -= 1; 148 154 149 155 const int itable_off = sbi->itable_off;
Note:
See TracChangeset
for help on using the changeset viewer.