mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
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:
parent
6cabb34884
commit
f69c53b019
2 changed files with 6 additions and 6 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue