summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorscottl <scottl@FreeBSD.org>2005-08-07 23:51:53 +0000
committerscottl <scottl@FreeBSD.org>2005-08-07 23:51:53 +0000
commit8d9fdc684977efad08d44b1d5b0bcf56ffe14cfb (patch)
tree0332611b2b03804e7e7fc92718ed5f9ccefa47d9
parentef1fbf3ef93d18c2cb42712d009ff30da2f9046e (diff)
downloadFreeBSD-src-8d9fdc684977efad08d44b1d5b0bcf56ffe14cfb.zip
FreeBSD-src-8d9fdc684977efad08d44b1d5b0bcf56ffe14cfb.tar.gz
The presence of a on __FreeBSD_version flagged some code that hasn't been in
the right spot since the FreeBSD 3.x days, if not earlier.
-rw-r--r--sys/dev/amr/amr_disk.c27
1 files changed, 4 insertions, 23 deletions
diff --git a/sys/dev/amr/amr_disk.c b/sys/dev/amr/amr_disk.c
index 047ada0..164d419 100644
--- a/sys/dev/amr/amr_disk.c
+++ b/sys/dev/amr/amr_disk.c
@@ -111,9 +111,6 @@ static int
amrd_open(struct disk *dp)
{
struct amrd_softc *sc = (struct amrd_softc *)dp->d_drv1;
-#if __FreeBSD_version < 500000 /* old buf style */
- struct disklabel *label;
-#endif
debug_called(1);
@@ -124,23 +121,6 @@ amrd_open(struct disk *dp)
if (sc->amrd_controller->amr_state & AMR_STATE_SHUTDOWN)
return(ENXIO);
-#if __FreeBSD_version < 500000 /* old buf style */
- label = &sc->amrd_disk.d_label;
- bzero(label, sizeof(*label));
- label->d_type = DTYPE_SCSI;
- label->d_secsize = AMR_BLKSIZE;
- label->d_nsectors = sc->amrd_drive->al_sectors;
- label->d_ntracks = sc->amrd_drive->al_heads;
- label->d_ncylinders = sc->amrd_drive->al_cylinders;
- label->d_secpercyl = sc->amrd_drive->al_sectors * sc->amrd_drive->al_heads;
- label->d_secperunit = sc->amrd_drive->al_size;
-#else
- sc->amrd_disk->d_sectorsize = AMR_BLKSIZE;
- sc->amrd_disk->d_mediasize = (off_t)sc->amrd_drive->al_size * AMR_BLKSIZE;
- sc->amrd_disk->d_fwsectors = sc->amrd_drive->al_sectors;
- sc->amrd_disk->d_fwheads = sc->amrd_drive->al_heads;
-#endif
-
return (0);
}
/********************************************************************************
@@ -257,10 +237,11 @@ amrd_attach(device_t dev)
sc->amrd_disk->d_dump = (dumper_t *)amrd_dump;
sc->amrd_disk->d_unit = sc->amrd_unit;
sc->amrd_disk->d_flags = 0;
+ sc->amrd_disk->d_sectorsize = AMR_BLKSIZE;
+ sc->amrd_disk->d_mediasize = (off_t)sc->amrd_drive->al_size * AMR_BLKSIZE;
+ sc->amrd_disk->d_fwsectors = sc->amrd_drive->al_sectors;
+ sc->amrd_disk->d_fwheads = sc->amrd_drive->al_heads;
disk_create(sc->amrd_disk, DISK_VERSION);
-#ifdef FREEBSD_4
- disks_registered++;
-#endif
return (0);
}
OpenPOWER on IntegriCloud