diff --git a/sys/boot/i386/libi386/biosdisk.c b/sys/boot/i386/libi386/biosdisk.c index 67c0f71a824..ff41c1ad57b 100644 --- a/sys/boot/i386/libi386/biosdisk.c +++ b/sys/boot/i386/libi386/biosdisk.c @@ -39,7 +39,6 @@ #include #include -#include #include #include @@ -83,7 +82,7 @@ struct open_disk { #define BD_PARTTABOK 0x0010 struct disklabel od_disklabel; int od_nslices; /* slice count */ - struct dos_partition od_slicetab[MAX_SLICES]; + struct dos_partition od_slicetab[NEXTDOSPART]; }; /* @@ -655,7 +654,7 @@ bd_checkextended(struct open_disk *od, int slicenum) for (i = 0; i < NDOSPART; i++, dp++) { if (dp->dp_size == 0) continue; - if (od->od_nslices == MAX_SLICES) + if (od->od_nslices == NEXTDOSPART) goto done; dp->dp_start += base; bcopy(dp, &od->od_slicetab[od->od_nslices], sizeof(*dp)); diff --git a/sys/boot/pc98/libpc98/biosdisk.c b/sys/boot/pc98/libpc98/biosdisk.c index d5c0a6574ab..2d9afbd7bb9 100644 --- a/sys/boot/pc98/libpc98/biosdisk.c +++ b/sys/boot/pc98/libpc98/biosdisk.c @@ -86,7 +86,7 @@ struct open_disk { #endif struct disklabel od_disklabel; int od_nslices; /* slice count */ - struct pc98_partition od_slicetab[MAX_SLICES]; + struct pc98_partition od_slicetab[NEXTDOSPART]; }; /* @@ -778,7 +778,7 @@ bd_checkextended(struct open_disk *od, int slicenum) for (i = 0; i < NDOSPART; i++, dp++) { if (dp->dp_size == 0) continue; - if (od->od_nslices == MAX_SLICES) + if (od->od_nslices == NEXTDOSPART) goto done; dp->dp_start += base; bcopy(dp, &od->od_slicetab[od->od_nslices], sizeof(*dp));