Removed diskerr()'s unused d_name arg and updated callers. This fixes

warnings caused by the arg having the wrong type (not const enough).
The arg was also wrong (a full name instead of a short one) for calls
from from subr_diskmbr.c and pc98/diskslice_machdep.c.
This commit is contained in:
Bruce Evans 1999-09-13 12:59:41 +00:00
parent c32cc1493f
commit 887ba12fc5
10 changed files with 14 additions and 17 deletions

View File

@ -2083,7 +2083,7 @@ retrier(struct fdc_data *fdc)
/* Trick diskerr */
bp->b_dev = makedev(major(bp->b_dev),
(FDUNIT(minor(bp->b_dev))<<3)|RAW_PART);
diskerr(bp, "fd", "hard error", LOG_PRINTF,
diskerr(bp, "hard error", LOG_PRINTF,
fdc->fd->skip / DEV_BSIZE,
(struct disklabel *)NULL);
bp->b_dev = sav_b_dev;

View File

@ -2090,7 +2090,7 @@ wderror(struct buf *bp, struct disk *du, char *mesg)
if (bp == NULL)
printf("wd%d: %s", du->dk_lunit, mesg);
else
diskerr(bp, "wd", mesg, LOG_PRINTF, du->dk_skip,
diskerr(bp, mesg, LOG_PRINTF, du->dk_skip,
dsgetlabel(bp->b_dev, du->dk_slices));
printf(" (status %b error %b)\n",
du->dk_status, WDCS_BITS, du->dk_error, WDERR_BITS);

View File

@ -2083,7 +2083,7 @@ retrier(struct fdc_data *fdc)
/* Trick diskerr */
bp->b_dev = makedev(major(bp->b_dev),
(FDUNIT(minor(bp->b_dev))<<3)|RAW_PART);
diskerr(bp, "fd", "hard error", LOG_PRINTF,
diskerr(bp, "hard error", LOG_PRINTF,
fdc->fd->skip / DEV_BSIZE,
(struct disklabel *)NULL);
bp->b_dev = sav_b_dev;

View File

@ -354,9 +354,9 @@ hp0g: hard error reading fsbn 12345 of 12344-12347 (hp0 bn %d cn %d tn %d sn %d)
* or addlog, respectively. There is no trailing space.
*/
void
diskerr(bp, dname, what, pri, blkdone, lp)
diskerr(bp, what, pri, blkdone, lp)
register struct buf *bp;
char *dname, *what;
char *what;
int pri, blkdone;
register struct disklabel *lp;
{

View File

@ -186,8 +186,7 @@ reread_mbr:
bp->b_flags |= B_READ;
BUF_STRATEGY(bp, 1);
if (biowait(bp) != 0) {
diskerr(bp, devtoname(bp->b_dev),
"error reading primary partition table",
diskerr(bp, "error reading primary partition table",
LOG_PRINTF, 0, (struct disklabel *)NULL);
printf("\n");
error = EIO;
@ -385,8 +384,7 @@ mbr_extended(dev, lp, ssp, ext_offset, ext_size, base_ext_offset, nsectors,
bp->b_flags |= B_READ;
BUF_STRATEGY(bp, 1);
if (biowait(bp) != 0) {
diskerr(bp, devtoname(bp->b_dev),
"error reading extended partition table",
diskerr(bp, "error reading extended partition table",
LOG_PRINTF, 0, (struct disklabel *)NULL);
printf("\n");
goto done;

View File

@ -2532,7 +2532,7 @@ retrier(struct fdc_data *fdc)
/* Trick diskerr */
bp->b_dev = makedev(major(bp->b_dev),
(FDUNIT(minor(bp->b_dev))<<3)|RAW_PART);
diskerr(bp, "fd", "hard error", LOG_PRINTF,
diskerr(bp, "hard error", LOG_PRINTF,
fdc->fd->skip / DEV_BSIZE,
(struct disklabel *)NULL);
bp->b_dev = sav_b_dev;

View File

@ -247,8 +247,7 @@ reread_mbr:
#endif
BUF_STRATEGY(bp, 1);
if (biowait(bp) != 0) {
diskerr(bp, devtoname(bp->b_dev),
"error reading primary partition table",
diskerr(bp, "error reading primary partition table",
LOG_PRINTF, 0, (struct disklabel *)NULL);
printf("\n");
error = EIO;
@ -538,7 +537,7 @@ extended(dname, dev, lp, ssp, ext_offset, ext_size, base_ext_offset,
bp->b_flags |= B_READ;
BUF_STRATEGY(bp, 1);
if (biowait(bp) != 0) {
diskerr(bp, dname, "error reading extended partition table",
diskerr(bp, "error reading extended partition table",
LOG_PRINTF, 0, (struct disklabel *)NULL);
printf("\n");
goto done;

View File

@ -2532,7 +2532,7 @@ retrier(struct fdc_data *fdc)
/* Trick diskerr */
bp->b_dev = makedev(major(bp->b_dev),
(FDUNIT(minor(bp->b_dev))<<3)|RAW_PART);
diskerr(bp, "fd", "hard error", LOG_PRINTF,
diskerr(bp, "hard error", LOG_PRINTF,
fdc->fd->skip / DEV_BSIZE,
(struct disklabel *)NULL);
bp->b_dev = sav_b_dev;

View File

@ -2327,7 +2327,7 @@ wderror(struct buf *bp, struct disk *du, char *mesg)
if (bp == NULL)
printf("wd%d: %s", du->dk_lunit, mesg);
else
diskerr(bp, "wd", mesg, LOG_PRINTF, du->dk_skip,
diskerr(bp, mesg, LOG_PRINTF, du->dk_skip,
dsgetlabel(bp->b_dev, du->dk_slices));
printf(" (status %b error %b)\n",
du->dk_status, WDCS_BITS, du->dk_error, WDERR_BITS);

View File

@ -354,9 +354,9 @@ hp0g: hard error reading fsbn 12345 of 12344-12347 (hp0 bn %d cn %d tn %d sn %d)
* or addlog, respectively. There is no trailing space.
*/
void
diskerr(bp, dname, what, pri, blkdone, lp)
diskerr(bp, what, pri, blkdone, lp)
register struct buf *bp;
char *dname, *what;
char *what;
int pri, blkdone;
register struct disklabel *lp;
{