Changeset View
Changeset View
Standalone View
Standalone View
sys/cam/scsi/scsi_cd.c
Show First 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | |||||
#include <sys/malloc.h> | #include <sys/malloc.h> | ||||
#include <sys/cdio.h> | #include <sys/cdio.h> | ||||
#include <sys/cdrio.h> | #include <sys/cdrio.h> | ||||
#include <sys/dvdio.h> | #include <sys/dvdio.h> | ||||
#include <sys/devicestat.h> | #include <sys/devicestat.h> | ||||
#include <sys/sbuf.h> | #include <sys/sbuf.h> | ||||
#include <sys/sysctl.h> | #include <sys/sysctl.h> | ||||
#include <sys/taskqueue.h> | #include <sys/taskqueue.h> | ||||
#include <sys/unistd.h> | |||||
#include <geom/geom_disk.h> | #include <geom/geom_disk.h> | ||||
#include <cam/cam.h> | #include <cam/cam.h> | ||||
#include <cam/cam_ccb.h> | #include <cam/cam_ccb.h> | ||||
#include <cam/cam_periph.h> | #include <cam/cam_periph.h> | ||||
#include <cam/cam_xpt_periph.h> | #include <cam/cam_xpt_periph.h> | ||||
#include <cam/cam_queue.h> | #include <cam/cam_queue.h> | ||||
#include <cam/cam_sim.h> | #include <cam/cam_sim.h> | ||||
▲ Show 20 Lines • Show All 569 Lines • ▼ Show 20 Lines | softc->disk->d_devstat = devstat_new_entry("cd", | ||||
XPORT_DEVSTAT_TYPE(cpi.transport), | XPORT_DEVSTAT_TYPE(cpi.transport), | ||||
DEVSTAT_PRIORITY_CD); | DEVSTAT_PRIORITY_CD); | ||||
softc->disk->d_open = cdopen; | softc->disk->d_open = cdopen; | ||||
softc->disk->d_close = cdclose; | softc->disk->d_close = cdclose; | ||||
softc->disk->d_strategy = cdstrategy; | softc->disk->d_strategy = cdstrategy; | ||||
softc->disk->d_gone = cddiskgonecb; | softc->disk->d_gone = cddiskgonecb; | ||||
softc->disk->d_ioctl = cdioctl; | softc->disk->d_ioctl = cdioctl; | ||||
softc->disk->d_name = "cd"; | softc->disk->d_name = "cd"; | ||||
softc->disk->d_mediaword = _PC_MEDIA_CDROM | _PC_MEDIA_SCSI; | |||||
cam_strvis(softc->disk->d_descr, cgd->inq_data.vendor, | cam_strvis(softc->disk->d_descr, cgd->inq_data.vendor, | ||||
sizeof(cgd->inq_data.vendor), sizeof(softc->disk->d_descr)); | sizeof(cgd->inq_data.vendor), sizeof(softc->disk->d_descr)); | ||||
strlcat(softc->disk->d_descr, " ", sizeof(softc->disk->d_descr)); | strlcat(softc->disk->d_descr, " ", sizeof(softc->disk->d_descr)); | ||||
cam_strvis(&softc->disk->d_descr[strlen(softc->disk->d_descr)], | cam_strvis(&softc->disk->d_descr[strlen(softc->disk->d_descr)], | ||||
cgd->inq_data.product, sizeof(cgd->inq_data.product), | cgd->inq_data.product, sizeof(cgd->inq_data.product), | ||||
sizeof(softc->disk->d_descr) - strlen(softc->disk->d_descr)); | sizeof(softc->disk->d_descr) - strlen(softc->disk->d_descr)); | ||||
softc->disk->d_unit = periph->unit_number; | softc->disk->d_unit = periph->unit_number; | ||||
softc->disk->d_drv1 = periph; | softc->disk->d_drv1 = periph; | ||||
▲ Show 20 Lines • Show All 3,054 Lines • Show Last 20 Lines |