getNamedType(pmap, num_parts, lp, SWAP_PART, -1, &maxslot);
read_mac_label(dev, strat, lp, osdep)	dev_t dev;	void (*strat)(struct buf *);	struct disklabel *lp;	struct cpu_disklabel *osdep;{	struct buf *bp;	char *msg = NULL;	int i = 0, num_parts = 0, maxslot = 0;	struct partmapentry pmap[NUM_PARTS_PROBED];	bp = geteblk((int)lp->d_secsize * NUM_PARTS_PROBED);	bp->b_dev = dev;	bp->b_blkno = 1;	/* partition map starts at blk 1 */	bp->b_bcount = lp->d_secsize * NUM_PARTS_PROBED;	bp->b_flags = B_BUSY | B_READ;	bp->b_cylin = 1 / lp->d_secpercyl;	(*strat)(bp);	if (biowait(bp)) {		msg = "I/O error reading partition map.";		goto done;	}	lp->d_npartitions = 1;	/* one for 'c' */	fixPartTable(pmap, lp->d_secsize, bp->b_un.b_addr, &num_parts);	if (getNamedType(pmap, num_parts, lp, ROOT_PART, 0, &maxslot))		getNamedType(pmap, num_parts, lp, ROOT_PART, -1, &maxslot);	if (getNamedType(pmap, num_parts, lp, UFS_PART, 0, &maxslot))		getNamedType(pmap, num_parts, lp, UFS_PART, -1, &maxslot);	getNamedType(pmap, num_parts, lp, SWAP_PART, -1, &maxslot);	for (i = 0; i < num_parts; i++) {		int partType;		int slot;		slot = getFreeLabelEntry(lp);		if (slot < 0)			break;		partType = whichType(&(pmap[i]));		switch (partType) {		case ROOT_PART:		/*		 * another root part will turn into a plain old		 * UFS_PART partition, live with it.		 */		case UFS_PART:			setUfs(&(pmap[i]), lp, slot);			if (slot > maxslot) maxslot = slot;			break;		case SWAP_PART:			setSwap(&(pmap[i]), lp, slot);			if (slot > maxslot) maxslot = slot;			break;		case HFS_PART:			setHfs(&(pmap[i]), lp, slot);			if (slot > maxslot) maxslot = slot;			break;		case SCRATCH_PART:			setScratch(&(pmap[i]), lp, slot);			if (slot > maxslot) maxslot = slot;			break;		default:			break;		}	}	lp->d_npartitions = maxslot+1;done:	bp->b_flags = B_INVAL | B_AGE | B_READ;	brelse(bp);	return msg;}