summaryrefslogtreecommitdiffstats
path: root/sys/cam/ctl/ctl_backend_ramdisk.c
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2014-07-05 03:34:52 +0000
committermav <mav@FreeBSD.org>2014-07-05 03:34:52 +0000
commit5ec7bb54efdc7d09277b000aa7862840b99d24ff (patch)
tree38f868c37f0b3951d20a3023aaa7d4b3a8ca116b /sys/cam/ctl/ctl_backend_ramdisk.c
parentbeac88825d205c569e7b4fbf974ce77a7a637dd6 (diff)
downloadFreeBSD-src-5ec7bb54efdc7d09277b000aa7862840b99d24ff.zip
FreeBSD-src-5ec7bb54efdc7d09277b000aa7862840b99d24ff.tar.gz
Make options KPI more generic to allow it to be used for ports too,
not only for LUNs.
Diffstat (limited to 'sys/cam/ctl/ctl_backend_ramdisk.c')
-rw-r--r--sys/cam/ctl/ctl_backend_ramdisk.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/cam/ctl/ctl_backend_ramdisk.c b/sys/cam/ctl/ctl_backend_ramdisk.c
index df01479..e1545e6 100644
--- a/sys/cam/ctl/ctl_backend_ramdisk.c
+++ b/sys/cam/ctl/ctl_backend_ramdisk.c
@@ -505,7 +505,7 @@ ctl_backend_ramdisk_rm(struct ctl_be_ramdisk_softc *softc,
if (retval == 0) {
taskqueue_drain(be_lun->io_taskqueue, &be_lun->io_task);
taskqueue_free(be_lun->io_taskqueue);
- ctl_free_opts(&be_lun->ctl_be_lun);
+ ctl_free_opts(&be_lun->ctl_be_lun.options);
mtx_destroy(&be_lun->queue_lock);
free(be_lun, M_RAMDISK);
}
@@ -548,7 +548,8 @@ ctl_backend_ramdisk_create(struct ctl_be_ramdisk_softc *softc,
goto bailout_error;
}
sprintf(be_lun->lunname, "cram%d", softc->num_luns);
- ctl_init_opts(&be_lun->ctl_be_lun, req);
+ ctl_init_opts(&be_lun->ctl_be_lun.options,
+ req->num_be_args, req->kern_be_args);
if (params->flags & CTL_LUN_FLAG_DEV_TYPE)
be_lun->ctl_be_lun.lun_type = params->device_type;
@@ -586,7 +587,7 @@ ctl_backend_ramdisk_create(struct ctl_be_ramdisk_softc *softc,
be_lun->softc = softc;
unmap = 0;
- value = ctl_get_opt(&be_lun->ctl_be_lun, "unmap");
+ value = ctl_get_opt(&be_lun->ctl_be_lun.options, "unmap");
if (value != NULL && strcmp(value, "on") == 0)
unmap = 1;
@@ -721,7 +722,7 @@ bailout_error:
if (be_lun->io_taskqueue != NULL) {
taskqueue_free(be_lun->io_taskqueue);
}
- ctl_free_opts(&be_lun->ctl_be_lun);
+ ctl_free_opts(&be_lun->ctl_be_lun.options);
mtx_destroy(&be_lun->queue_lock);
free(be_lun, M_RAMDISK);
}
OpenPOWER on IntegriCloud