diff --git a/sys/geom/part/g_part_mbr.c b/sys/geom/part/g_part_mbr.c index 838f09ce3e9f..4fa829a3c91e 100644 --- a/sys/geom/part/g_part_mbr.c +++ b/sys/geom/part/g_part_mbr.c @@ -262,7 +262,7 @@ g_part_mbr_create(struct g_part_table *basetable, struct g_part_parms *gpp) if (pp->sectorsize < MBRSIZE) return (ENOSPC); - msize = MIN(pp->mediasize / pp->sectorsize, UINT_MAX); + msize = MIN(pp->mediasize / pp->sectorsize, UINT32_MAX); basetable->gpt_first = basetable->gpt_sectors; basetable->gpt_last = msize - (msize % basetable->gpt_sectors) - 1; @@ -433,7 +433,7 @@ g_part_mbr_read(struct g_part_table *basetable, struct g_consumer *cp) pp = cp->provider; table = (struct g_part_mbr_table *)basetable; - msize = MIN(pp->mediasize / pp->sectorsize, UINT_MAX); + msize = MIN(pp->mediasize / pp->sectorsize, UINT32_MAX); buf = g_read_data(cp, 0L, pp->sectorsize, &error); if (buf == NULL) diff --git a/sys/geom/part/g_part_pc98.c b/sys/geom/part/g_part_pc98.c index 83d37f263753..693fad881c30 100644 --- a/sys/geom/part/g_part_pc98.c +++ b/sys/geom/part/g_part_pc98.c @@ -261,7 +261,7 @@ g_part_pc98_create(struct g_part_table *basetable, struct g_part_parms *gpp) cyl = basetable->gpt_heads * basetable->gpt_sectors; - msize = MIN(pp->mediasize / SECSIZE, UINT_MAX); + msize = MIN(pp->mediasize / SECSIZE, UINT32_MAX); basetable->gpt_first = cyl; basetable->gpt_last = msize - (msize % cyl) - 1; @@ -451,7 +451,7 @@ g_part_pc98_read(struct g_part_table *basetable, struct g_consumer *cp) pp = cp->provider; table = (struct g_part_pc98_table *)basetable; - msize = MIN(pp->mediasize / SECSIZE, UINT_MAX); + msize = MIN(pp->mediasize / SECSIZE, UINT32_MAX); buf = g_read_data(cp, 0L, BOOTSIZE, &error); if (buf == NULL)