Don't pass the label to diskerr(), since the label is being constructed

and may be invalid.  In particular, d_secpercyl may be 0, and diskerr()
divides by it.
This commit is contained in:
Bruce Evans 1998-07-25 16:35:06 +00:00
parent 6cabb34884
commit f69c53b019
2 changed files with 6 additions and 6 deletions

View file

@ -35,7 +35,7 @@
*
* from: @(#)ufs_disksubr.c 7.16 (Berkeley) 5/4/91
* from: ufs_disksubr.c,v 1.8 1994/06/07 01:21:39 phk Exp $
* $Id: diskslice_machdep.c,v 1.28 1998/07/11 07:45:35 bde Exp $
* $Id: diskslice_machdep.c,v 1.29 1998/07/20 13:39:43 bde Exp $
*/
#include <sys/param.h>
@ -184,7 +184,7 @@ reread_mbr:
(*strat)(bp);
if (biowait(bp) != 0) {
diskerr(bp, dname, "error reading primary partition table",
LOG_PRINTF, 0, lp);
LOG_PRINTF, 0, (struct disklabel *)NULL);
printf("\n");
error = EIO;
goto done;
@ -373,7 +373,7 @@ extended(dname, dev, strat, lp, ssp, ext_offset, ext_size, base_ext_offset,
(*strat)(bp);
if (biowait(bp) != 0) {
diskerr(bp, dname, "error reading extended partition table",
LOG_PRINTF, 0, lp);
LOG_PRINTF, 0, (struct disklabel *)NULL);
printf("\n");
goto done;
}

View file

@ -35,7 +35,7 @@
*
* from: @(#)ufs_disksubr.c 7.16 (Berkeley) 5/4/91
* from: ufs_disksubr.c,v 1.8 1994/06/07 01:21:39 phk Exp $
* $Id: diskslice_machdep.c,v 1.28 1998/07/11 07:45:35 bde Exp $
* $Id: diskslice_machdep.c,v 1.29 1998/07/20 13:39:43 bde Exp $
*/
#include <sys/param.h>
@ -184,7 +184,7 @@ reread_mbr:
(*strat)(bp);
if (biowait(bp) != 0) {
diskerr(bp, dname, "error reading primary partition table",
LOG_PRINTF, 0, lp);
LOG_PRINTF, 0, (struct disklabel *)NULL);
printf("\n");
error = EIO;
goto done;
@ -373,7 +373,7 @@ extended(dname, dev, strat, lp, ssp, ext_offset, ext_size, base_ext_offset,
(*strat)(bp);
if (biowait(bp) != 0) {
diskerr(bp, dname, "error reading extended partition table",
LOG_PRINTF, 0, lp);
LOG_PRINTF, 0, (struct disklabel *)NULL);
printf("\n");
goto done;
}