From: Ruediger Meier <ruediger.meier@xxxxxxxxxxx> Our test-suite discoverd it on big endian systems, but it was also broken on little endian for inode numbers > 0xffff. Signed-off-by: Ruediger Meier <ruediger.meier@xxxxxxxxxxx> --- disk-utils/fsck.minix.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/disk-utils/fsck.minix.c b/disk-utils/fsck.minix.c index 2058a97..a040cf5 100644 --- a/disk-utils/fsck.minix.c +++ b/disk-utils/fsck.minix.c @@ -1011,13 +1011,14 @@ check_file2(struct minix2_inode *dir, unsigned int offset) { block = map_block2(dir, offset / MINIX_BLOCK_SIZE); read_block(block, blk); name = blk + (offset % MINIX_BLOCK_SIZE) + version_offset; - ino = *(unsigned short *)(name - version_offset); + ino = version_offset == 4 ? *(uint32_t *)(name - version_offset) + : *(uint16_t *)(name - version_offset); if (ino > get_ninodes()) { get_current_name(); printf(_("The directory '%s' contains a bad inode number " "for file '%.*s'."), current_name, (int)namelen, name); if (ask(_(" Remove"), 1)) { - *(unsigned short *)(name - version_offset) = 0; + memset(name - version_offset, 0, version_offset); write_block(block, blk); } ino = 0; -- 1.8.4.5 -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html