summaryrefslogtreecommitdiffstats
path: root/sys/cam
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-02-21 19:00:48 +0000
committerphk <phk@FreeBSD.org>2003-02-21 19:00:48 +0000
commit02e550fabbccfb3ee4ca8b767f672f042bce9239 (patch)
tree0a783f7251946cbeba07417df9c459d72a6aa14e /sys/cam
parentc6646c2f7da7d39f3506c8ff46b821f065dc318f (diff)
downloadFreeBSD-src-02e550fabbccfb3ee4ca8b767f672f042bce9239.zip
FreeBSD-src-02e550fabbccfb3ee4ca8b767f672f042bce9239.tar.gz
NO_GEOM cleanup:
Retire the "d_dump_t" and use the "dumper_t" type instead. Dumper_t takes a void * as first arg which is more general than the dev_t taken by d_dump_t. (Remember: we could have net-dumpers if somebody wrote us one!) Define the convention for GEOM controlled disk devices to be that the first argument to the dumper function is the struct disk pointer. Change device drivers accordingly.
Diffstat (limited to 'sys/cam')
-rw-r--r--sys/cam/scsi/scsi_da.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c
index 77bc449..fa37690 100644
--- a/sys/cam/scsi/scsi_da.c
+++ b/sys/cam/scsi/scsi_da.c
@@ -453,7 +453,7 @@ static d_open_t daopen;
static d_close_t daclose;
static d_strategy_t dastrategy;
static d_ioctl_t daioctl;
-static d_dump_t dadump;
+static dumper_t dadump;
static periph_init_t dainit;
static void daasync(void *callback_arg, u_int32_t code,
struct cam_path *path, void *arg);
@@ -814,14 +814,16 @@ daioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td)
}
static int
-dadump(dev_t dev, void *virtual, vm_offset_t physical, off_t offset, size_t length)
+dadump(void *arg, void *virtual, vm_offset_t physical, off_t offset, size_t length)
{
struct cam_periph *periph;
struct da_softc *softc;
u_int secsize;
struct ccb_scsiio csio;
+ struct disk *dp;
- periph = (struct cam_periph *)dev->si_drv1;
+ dp = arg;
+ periph = (struct cam_periph *)dp->d_dev->si_drv1;
if (periph == NULL)
return (ENXIO);
softc = (struct da_softc *)periph->softc;
OpenPOWER on IntegriCloud