This is the hpphys procedure from %sys/dmr/hp.c.
The old one contained a bug in that overflow could occur
and the end of a logical disk might not be detected.

hpphys( dev , flag )
int	dev;
int	flag;	/* B_READ or B_WRITE */
{
	register unsigned a, b, c;

	a = hp_sizes[dev.d_minor & 07].nblocks;
	b = u.u_offset >> 9;
	if(b >= a)
	{
		u.u_error = ENXIO;
		return;
	}
	a =- b;
	c = u.u_count;
	if(((c-1) / 512) >= a)
		c = a << 9;
	a = u.u_count - c;
	u.u_count = c;
#ifdef	RAW_BUFFER_POOL
	physio(hpstrategy,      0, dev, flag);
#else
	physio(hpstrategy, &hpbuf, dev, flag);
#endif	RAW_BUFFER_POOL
	u.u_count =+ a;
}
