From: Nate Clark Date: Wed, 4 Jan 2017 20:24:22 +0000 (-0500) Subject: libblkid/minix: Match minix superblock types X-Git-Tag: v2.30-rc1~316^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a9975c1072c4975ec2df958188a80d89cabc6171;p=thirdparty%2Futil-linux.git libblkid/minix: Match minix superblock types All of the types in the minix super block are unsigned but in probe_minix they were being treated as signed. This would cause some of the extra sanity checks to pass on a non minix device. The types were updated to match the return types of the helper functions in disk-utils/minix_programs.h This can be checked by creating a swap partition with one of these UUIDs 35f1f264-2468-471a-bc85-acc9f4bc04a3 35f1f264-6824-471a-bc85-acc9f4bc04a3 35f1f264-2478-471a-bc85-acc9f4bc04a3 35f1f264-7824-471a-bc85-acc9f4bc04a3 Prior to this change they would all be considered minix and swap by blkid. Signed-off-by: Nate Clark --- diff --git a/libblkid/src/superblocks/minix.c b/libblkid/src/superblocks/minix.c index d350f8978e..628b246ee8 100644 --- a/libblkid/src/superblocks/minix.c +++ b/libblkid/src/superblocks/minix.c @@ -89,7 +89,8 @@ static int probe_minix(blkid_probe pr, if (version <= 2) { struct minix_super_block *sb = (struct minix_super_block *) data; - int zones, ninodes, imaps, zmaps, firstz; + unsigned long zones, ninodes, imaps, zmaps; + off_t firstz; if (sb->s_imap_blocks == 0 || sb->s_zmap_blocks == 0 || sb->s_log_zone_size != 0)