Now I could finally test this change: bad144 is now relative to the

partition.
This commit is contained in:
Poul-Henning Kamp 1995-05-21 03:27:13 +00:00
parent e841846b60
commit 75e21a4e1e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=8667

View File

@ -24,7 +24,7 @@
* the rights to redistribute these changes.
*
* from: Mach, Revision 2.2 92/04/04 11:35:49 rpd
* $Id: disk.c,v 1.10 1995/05/08 02:02:56 phk Exp $
* $Id: disk.c,v 1.11 1995/05/11 16:19:50 phk Exp $
*/
/*
@ -256,9 +256,9 @@ badsect(int dosdev, int sector)
goto no_remap;
}
cyl = sector / dl->d_secpercyl;
head = (sector % dl->d_secpercyl) / dl->d_nsectors;
sec = sector % dl->d_nsectors;
cyl = (sector-boff) / dl->d_secpercyl;
head = ((sector-boff) % dl->d_secpercyl) / dl->d_nsectors;
sec = (sector-boff) % dl->d_nsectors;
sec = (head<<8) + sec;
/* now, look in the table for a possible bad sector */