summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2002-10-18 22:03:39 +0000
committernjl <njl@FreeBSD.org>2002-10-18 22:03:39 +0000
commit181311508173b9c70205bd14450f104550fe7bac (patch)
tree540c29f87f9954dc980102ee2621565072883c36 /sys/dev
parent1bac0e0b4c757dd560b18b70ad1a3a28028cf233 (diff)
downloadFreeBSD-src-181311508173b9c70205bd14450f104550fe7bac.zip
FreeBSD-src-181311508173b9c70205bd14450f104550fe7bac.tar.gz
* Add CDRIOC{READ,WRITE}SPEED ioctls to cd(4). Units are in KB/sec.
* Change atapi-cd ioctls to use the same units. * Change burncd, cdcontrol to convert CDROM speed to KB/sec before calling the ioctl. Add a "max" speed option for their command lines. This change does not break ABI but does change the units passed through the ioctl so 3rd party software that uses cdrio.h will have to convert (most likely by multiplying CDROM speed by 177 to get KB/s). PR: kern/36845 Submitted by: Philipp Mergenthaler <p@i609a.hadiko.de> (CAM ioctls) Reviewed by: sos, ken MFC after: 1 month
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ata/atapi-cd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ata/atapi-cd.c b/sys/dev/ata/atapi-cd.c
index 6e91ef7..d3bcd60 100644
--- a/sys/dev/ata/atapi-cd.c
+++ b/sys/dev/ata/atapi-cd.c
@@ -1021,11 +1021,11 @@ acdioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct thread *td)
break;
case CDRIOCREADSPEED:
- error = acd_set_speed(cdp, 177 * (*(int *)addr), -1);
+ error = acd_set_speed(cdp, *(int *)addr, CDR_MAX_SPEED);
break;
case CDRIOCWRITESPEED:
- error = acd_set_speed(cdp, -1, 177 * (*(int *)addr));
+ error = acd_set_speed(cdp, CDR_MAX_SPEED, *(int *)addr);
break;
case CDRIOCGETBLOCKSIZE:
OpenPOWER on IntegriCloud