]> git.ipfire.org Git - thirdparty/util-linux.git/commit
disk-utils/mkfs.minix: Set ninodes after checking max
authorNate Clark <nate@neworld.us>
Wed, 4 Jan 2017 17:31:37 +0000 (12:31 -0500)
committerNate Clark <nate@neworld.us>
Wed, 4 Jan 2017 19:42:59 +0000 (14:42 -0500)
commitb7b26945d1e4491934111d65ac49091daefbdda8
treeb58694cc729364f66c3fd2e25fdab3916d500ecc
parent63dc575be3f956b3383d8be248b945b5b8fb2e28
disk-utils/mkfs.minix: Set ninodes after checking max

ninodes in the superblock needs to be set after inodes is checked
against MINIX_MAX_INODES otherwise a value larger than MINIX_MAX_INODES
can be attempted to be stored in the superblock.

Without this change the command "mkfs.minix -2 -i 65530 <dev>" would
write a minix superblock with ninodes set to 0.

Signed-off-by: Nate Clark <nate@neworld.us>
disk-utils/mkfs.minix.c
tests/expected/minix/mkfs-v2i65535 [new file with mode: 0644]
tests/ts/minix/mkfs