From 181311508173b9c70205bd14450f104550fe7bac Mon Sep 17 00:00:00 2001 From: njl Date: Fri, 18 Oct 2002 22:03:39 +0000 Subject: * 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 (CAM ioctls) Reviewed by: sos, ken MFC after: 1 month --- usr.sbin/burncd/burncd.8 | 1 + usr.sbin/burncd/burncd.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'usr.sbin/burncd') diff --git a/usr.sbin/burncd/burncd.8 b/usr.sbin/burncd/burncd.8 index 47dc84f..520ed9a 100644 --- a/usr.sbin/burncd/burncd.8 +++ b/usr.sbin/burncd/burncd.8 @@ -69,6 +69,7 @@ quiet, do not print progress messages. .It Fl s Ar speed set the speed of the burner device. Defaults to 1. +Specify "max" to use the drive's fastest speed. .It Fl t test write, do not actually write on the media. .It Fl v diff --git a/usr.sbin/burncd/burncd.c b/usr.sbin/burncd/burncd.c index 1d3d2fd..9f3738e 100644 --- a/usr.sbin/burncd/burncd.c +++ b/usr.sbin/burncd/burncd.c @@ -116,7 +116,10 @@ main(int argc, char **argv) break; case 's': - speed = atoi(optarg); + if (strcasecmp("max", optarg) == 0) + speed = CDR_MAX_SPEED; + else + speed = atoi(optarg); if (speed <= 0) errx(EX_USAGE, "Invalid speed: %s", optarg); break; -- cgit v1.1