summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/cam/scsi/scsi_cd.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/cam/scsi/scsi_cd.c b/sys/cam/scsi/scsi_cd.c
index 06823f2..5e88a97 100644
--- a/sys/cam/scsi/scsi_cd.c
+++ b/sys/cam/scsi/scsi_cd.c
@@ -2685,6 +2685,16 @@ cdioctl(struct disk *dp, u_long cmd, void *addr, int flag, struct thread *td)
error = cdsetspeed(periph, CDR_MAX_SPEED, *(u_int32_t *)addr);
cam_periph_unlock(periph);
break;
+ case CDRIOCGETBLOCKSIZE:
+ *(int *)addr = softc->params.blksize;
+ break;
+ case CDRIOCSETBLOCKSIZE:
+ if (*(int *)addr <= 0) {
+ error = EINVAL;
+ break;
+ }
+ softc->disk->d_sectorsize = softc->params.blksize = *(int *)addr;
+ break;
case DVDIOCSENDKEY:
case DVDIOCREPORTKEY: {
struct dvd_authinfo *authinfo;
OpenPOWER on IntegriCloud