aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/aac
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2002-09-20 12:52:03 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2002-09-20 12:52:03 +0000
commitf90c382c0c6c8b94d43903c8df4b52b4574fadd8 (patch)
tree1d367b627ceceea40420446ef7bb5ef0ae17c419 /sys/dev/aac
parent47fae43eab10c482074c64a399e3a07ea9375d9f (diff)
downloadsrc-f90c382c0c6c8b94d43903c8df4b52b4574fadd8.tar.gz
src-f90c382c0c6c8b94d43903c8df4b52b4574fadd8.zip
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.
Notes
Notes: svn path=/head/; revision=103675
Diffstat (limited to 'sys/dev/aac')
-rw-r--r--sys/dev/aac/aac_disk.c8
-rw-r--r--sys/dev/aac/aacvar.h1
2 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/aac/aac_disk.c b/sys/dev/aac/aac_disk.c
index 000d8415f8f7..91ceee0985a8 100644
--- a/sys/dev/aac/aac_disk.c
+++ b/sys/dev/aac/aac_disk.c
@@ -305,7 +305,6 @@ void
aac_biodone(struct bio *bp)
{
struct aac_disk *sc;
- int blkno;
debug_called(4);
@@ -313,10 +312,15 @@ aac_biodone(struct bio *bp)
devstat_end_transaction_bio(&sc->ad_stats, bp);
if (bp->bio_flags & BIO_ERROR) {
+#if __FreeBSD_version > 500039
+ disk_err(bp, "hard error", -1, 1);
+#elif __FreeBSD_version > 500005
+ int blkno;
blkno = (sc->ad_label.d_nsectors) ? 0 : -1;
-#if __FreeBSD_version > 500005
diskerr(bp, (char *)bp->bio_driver1, blkno, &sc->ad_label);
#else
+ int blkno;
+ blkno = (sc->ad_label.d_nsectors) ? 0 : -1;
diskerr(bp, (char *)bp->bio_driver1, 0, blkno, &sc->ad_label);
#endif
}
diff --git a/sys/dev/aac/aacvar.h b/sys/dev/aac/aacvar.h
index d82f29edda64..0f615f10944c 100644
--- a/sys/dev/aac/aacvar.h
+++ b/sys/dev/aac/aacvar.h
@@ -120,7 +120,6 @@ struct aac_disk
struct aac_container *ad_container;
struct disk ad_disk;
struct devstat ad_stats;
- struct disklabel ad_label;
int ad_flags;
#define AAC_DISK_OPEN (1<<0)
int ad_cylinders;