Changeset e2267e82 in mainline
- Timestamp:
- 2011-03-06T22:38:34Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e80b1de
- Parents:
- e03a733
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/mkminix/mkminix.c
re03a733 re2267e82 236 236 int ino_per_block = 0; 237 237 int fs_version; 238 aoff64_t tmp;238 aoff64_t inodes; 239 239 240 240 if (opt->fs_magic == MFS_MAGIC_V1) { … … 264 264 /*Round up the number of inodes to fill block size*/ 265 265 if (opt->n_inodes == 0) 266 tmp= opt->dev_nblocks / 3;266 inodes = opt->dev_nblocks / 3; 267 267 else 268 tmp= opt->n_inodes;269 270 if ( tmp% ino_per_block)271 tmp = ((tmp/ ino_per_block) + 1) * ino_per_block;272 sb->s_ninodes = tmp > UINT16_MAX ? UINT16_MAX : tmp;268 inodes = opt->n_inodes; 269 270 if (inodes % ino_per_block) 271 inodes = ((inodes / ino_per_block) + 1) * ino_per_block; 272 sb->s_ninodes = inodes > UINT16_MAX ? UINT16_MAX : inodes; 273 273 274 274 /*Compute inode bitmap size in blocks*/ … … 303 303 int ino_per_block; 304 304 int bs; 305 aoff64_t tmp;305 aoff64_t inodes; 306 306 307 307 sb->s_magic = opt->fs_magic; … … 309 309 310 310 if (opt->n_inodes == 0) 311 tmp= opt->dev_nblocks / 3;311 inodes = opt->dev_nblocks / 3; 312 312 else 313 tmp = opt->n_inodes; 313 inodes = opt->n_inodes; 314 315 /*Round up the number of inodes to fill block size*/ 316 ino_per_block = V3_INODES_PER_BLOCK(bs); 317 if (inodes % ino_per_block) 318 inodes = ((inodes / ino_per_block) + 1) * ino_per_block; 319 sb->s_ninodes = inodes > UINT32_MAX ? UINT32_MAX : inodes; 314 320 315 321 /*Compute the number of zones on disk*/ … … 317 323 UINT32_MAX : opt->dev_nblocks; 318 324 sb->s_nzones /= (bs / MFS_MIN_BLOCKSIZE); 319 320 /*Round up the number of inodes to fill block size*/321 ino_per_block = V3_INODES_PER_BLOCK(bs);322 if (tmp % ino_per_block)323 tmp = ((tmp / ino_per_block) + 1) * ino_per_block;324 sb->s_ninodes = tmp > UINT32_MAX ? UINT32_MAX : tmp;325 325 326 326 /*Compute inode bitmap size in blocks*/
Note:
See TracChangeset
for help on using the changeset viewer.