diff options
author | phk <phk@FreeBSD.org> | 2002-09-20 12:52:03 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2002-09-20 12:52:03 +0000 |
commit | 1919170e9039df45d87abbe1d7b256cc0db1ed19 (patch) | |
tree | 1d367b627ceceea40420446ef7bb5ef0ae17c419 /sys/kern/subr_diskmbr.c | |
parent | b003f2381fcadb1c640d68a8885d0a806a0e8d9c (diff) | |
download | FreeBSD-src-1919170e9039df45d87abbe1d7b256cc0db1ed19.zip FreeBSD-src-1919170e9039df45d87abbe1d7b256cc0db1ed19.tar.gz |
Make FreeBSD "struct disklabel" agnostic, step 311 of 723:
Rename diskerr() to disk_err() for naming consistency.
Drop the by now entirely useless struct disklabel argument.
Add a flag argument for new-line termination.
Fix a couple of printf-format-casts to %j instead of %l.
Correctly print the name of all bio commands.
Move the function from subr_disklabel.c to subr_disk.c,
and from <sys/disklabel.h> to <sys/disk.h>.
Use the new disk_err() throughout, #include <sys/disk.h> as needed.
Bump __FreeBSD_version for the sake of the aac disk drivers #ifdefs.
Remove unused disklabel members of softc for aac, amr and mlx, which seem
to originally have been intended for diskerr() use, but which only rotted
and got Copy&Pasted at least two times to many.
Sponsored by: DARPA & NAI Labs.
Diffstat (limited to 'sys/kern/subr_diskmbr.c')
-rw-r--r-- | sys/kern/subr_diskmbr.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/kern/subr_diskmbr.c b/sys/kern/subr_diskmbr.c index 40d5b2d..2154f30 100644 --- a/sys/kern/subr_diskmbr.c +++ b/sys/kern/subr_diskmbr.c @@ -47,6 +47,7 @@ #define PC98_ATCOMPAT #define dsinit atcompat_dsinit #endif +#include <sys/disk.h> #include <sys/disklabel.h> #define DOSPTYP_EXTENDED 5 #define DOSPTYP_EXTENDEDX 15 @@ -214,9 +215,8 @@ reread_mbr: bp->b_iocmd = BIO_READ; DEV_STRATEGY(bp, 1); if (bufwait(bp) != 0) { - diskerr(&bp->b_io, "reading primary partition table: error", - 0, (struct disklabel *)NULL); - printf("\n"); + disk_err(&bp->b_io, "reading primary partition table: error", + 0, 1); error = EIO; goto done; } @@ -417,9 +417,8 @@ mbr_extended(dev, lp, ssp, ext_offset, ext_size, base_ext_offset, nsectors, bp->b_iocmd = BIO_READ; DEV_STRATEGY(bp, 1); if (bufwait(bp) != 0) { - diskerr(&bp->b_io, "reading extended partition table: error", - 0, (struct disklabel *)NULL); - printf("\n"); + disk_err(&bp->b_io, "reading extended partition table: error", + 0, 1); goto done; } |