Use NEXTDOSPART instead of MAX_SLICES.

This commit is contained in:
Poul-Henning Kamp 2003-01-20 11:15:12 +00:00
parent 5a3d3419f8
commit 63fc86da6f
2 changed files with 4 additions and 5 deletions

View file

@ -39,7 +39,6 @@
#include <stand.h>
#include <sys/disklabel.h>
#include <sys/diskslice.h>
#include <sys/diskmbr.h>
#include <sys/reboot.h>
@ -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));

View file

@ -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));