1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-15 15:06:42 +00:00

Use RAW_PART=2 to trick diskerr

This commit is contained in:
Andrey A. Chernov 1994-08-29 21:32:31 +00:00
parent c594d6c8a3
commit b2be795bf2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=2397
3 changed files with 12 additions and 6 deletions
sys
dev/fdc
i386/isa
isa

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
* $Id: fd.c,v 1.27 1994/08/13 03:49:57 wollman Exp $
* $Id: fd.c,v 1.28 1994/08/23 07:52:09 paul Exp $
*
*/
@ -71,6 +71,8 @@
extern int ftopen(), ftintr(), ftattach(), ftclose(), ftioctl();
#endif
#define RAW_PART 2
#define b_cylin b_resid
#define FDBLK 512
@ -1066,7 +1068,7 @@ retrier(fdcu)
{
dev_t sav_b_dev = bp->b_dev;
/* Trick diskerr */
bp->b_dev = makedev(major(bp->b_dev), (FDUNIT(minor(bp->b_dev))<<3)|3);
bp->b_dev = makedev(major(bp->b_dev), (FDUNIT(minor(bp->b_dev))<<3)|RAW_PART);
diskerr(bp, "fd", "hard error", LOG_PRINTF,
fdc->fd->skip, (struct disklabel *)NULL);
bp->b_dev = sav_b_dev;

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
* $Id: fd.c,v 1.27 1994/08/13 03:49:57 wollman Exp $
* $Id: fd.c,v 1.28 1994/08/23 07:52:09 paul Exp $
*
*/
@ -71,6 +71,8 @@
extern int ftopen(), ftintr(), ftattach(), ftclose(), ftioctl();
#endif
#define RAW_PART 2
#define b_cylin b_resid
#define FDBLK 512
@ -1066,7 +1068,7 @@ retrier(fdcu)
{
dev_t sav_b_dev = bp->b_dev;
/* Trick diskerr */
bp->b_dev = makedev(major(bp->b_dev), (FDUNIT(minor(bp->b_dev))<<3)|3);
bp->b_dev = makedev(major(bp->b_dev), (FDUNIT(minor(bp->b_dev))<<3)|RAW_PART);
diskerr(bp, "fd", "hard error", LOG_PRINTF,
fdc->fd->skip, (struct disklabel *)NULL);
bp->b_dev = sav_b_dev;

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
* $Id: fd.c,v 1.27 1994/08/13 03:49:57 wollman Exp $
* $Id: fd.c,v 1.28 1994/08/23 07:52:09 paul Exp $
*
*/
@ -71,6 +71,8 @@
extern int ftopen(), ftintr(), ftattach(), ftclose(), ftioctl();
#endif
#define RAW_PART 2
#define b_cylin b_resid
#define FDBLK 512
@ -1066,7 +1068,7 @@ retrier(fdcu)
{
dev_t sav_b_dev = bp->b_dev;
/* Trick diskerr */
bp->b_dev = makedev(major(bp->b_dev), (FDUNIT(minor(bp->b_dev))<<3)|3);
bp->b_dev = makedev(major(bp->b_dev), (FDUNIT(minor(bp->b_dev))<<3)|RAW_PART);
diskerr(bp, "fd", "hard error", LOG_PRINTF,
fdc->fd->skip, (struct disklabel *)NULL);
bp->b_dev = sav_b_dev;