Subject: Re: fsck -c 2 , superblock etc.
To: None <ws@tools.de>
From: Bill Sommerfeld <sommerfeld@orchard.medford.ma.us>
List: current-users
Date: 06/28/1994 22:51:27
Here's a trivial patch to wd.c to avoid the crash (you instead get a
CANNOT READ BLOCK xxx error, which is much less nasty..)

					- Bill

*** 1.6	1994/06/17 13:34:24
--- wd.c	1994/06/29 02:48:42
***************
*** 343,348 ****
--- 343,349 ----
  	/* Valid unit, controller, and request?  */
  	if (lunit >= wdcd.cd_ndevs || bp->b_blkno < 0 ||
  	    howmany(bp->b_bcount, DEV_BSIZE) >= (1 << NBBY) ||
+ 	    ((bp->b_bcount & (DEV_BSIZE-1)) != 0) ||
  	    (wd = wdcd.cd_devs[lunit]) == 0) {
  		bp->b_error = EINVAL;
  		bp->b_flags |= B_ERROR;

------------------------------------------------------------------------------