if (!(dbtob(blkno - dumplo) % (1024*1024))) printf("%d ", (dumpsize - maddr) / btoc(1024*1024));
if (dbtob(blkno - dumplo) % (1024 * 1024) < NBPG) printf("%d ", (ctob(dumpsize) - maddr) / (1024 * 1024));
dumpsys(){	register u_int i, j, npg;	register int maddr;	daddr_t blkno;	int (*dump) __P((dev_t, daddr_t, caddr_t, size_t));	int error;	register char *str;	extern int msgbufmapped;	/* Save registers. */	savectx(&dumppcb);	msgbufmapped = 0;	/* don't record dump msgs in msgbuf */	if (dumpdev == NODEV)		return;	/*	 * For dumps during autoconfiguration,	 * if dump device has already configured...	 */	if (dumpsize == 0)		dumpconf();	if (dumplo < 0)		return;	printf("\ndumping to dev %x, offset %ld\n", dumpdev, dumplo);	error = (*bdevsw[major(dumpdev)].d_psize)(dumpdev);	printf("dump ");	if (error == -1) {		printf("area unavailable\n");		return;	}#if 0	/* XXX this doesn't work.  grr. */	/* toss any characters present prior to dump */	while (sget() != NULL); /*syscons and pccons differ */#endif	/* scan through the dumpmem list */	dump = bdevsw[major(dumpdev)].d_dump;	error = cpu_dump();	for (i = 0; !error && i < ndumpmem; i++) {		npg = dumpmem[i].end - dumpmem[i].start;		maddr = ctob(dumpmem[i].start);		blkno = dumplo + btodb(maddr) + 1;#if 0		printf("(%d %ld %d) ", maddr, blkno, npg);#endif		for (j = npg; j--; maddr += NBPG, blkno += btodb(NBPG)) {			/* Print out how many MBs we have more to go. */			if (!(dbtob(blkno - dumplo) % (1024*1024)))				printf("%d ", (dumpsize - maddr) /					      btoc(1024*1024));#if 0			printf("(%x %d) ", maddr, blkno);#endif			pmap_enter(pmap_kernel(), dumpspace, maddr,				   VM_PROT_READ, TRUE, 0);			if ((error = (*dump)(dumpdev, blkno,					     (caddr_t)dumpspace, NBPG)))				break;#if 0	/* XXX this doesn't work.  grr. */			/* operator aborting dump? */			if (sget() != NULL) {				error = EINTR;				break;			}#endif		}	}	switch (error) {	case 0:		str = "succeeded\n\n";			break;	case ENXIO:	str = "device bad\n\n";			break;	case EFAULT:	str = "device not ready\n\n";		break;	case EINVAL:	str = "area improper\n\n";		break;	case EIO:	str = "i/o error\n\n";			break;	case EINTR:	str = "aborted from console\n\n";	break;	default:	str = "error %d\n\n";			break;	}	printf(str, error);	delay(5000000);		/* 5 seconds */}