summaryrefslogtreecommitdiffstats
path: root/usr.sbin/burncd
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2002-10-27 17:43:22 +0000
committernjl <njl@FreeBSD.org>2002-10-27 17:43:22 +0000
commite11ca3bf1ae8049b0bb5da0682f7cfc7969e3794 (patch)
tree4bfd6dd752283721c153b2d7005b8eccd69f5041 /usr.sbin/burncd
parent911ff37bf74a5a4a5ae413c85e9e858c49025047 (diff)
downloadFreeBSD-src-e11ca3bf1ae8049b0bb5da0682f7cfc7969e3794.zip
FreeBSD-src-e11ca3bf1ae8049b0bb5da0682f7cfc7969e3794.tar.gz
Move speed units conversion to right before it is used. This catches the
case when the -s option is not used.
Diffstat (limited to 'usr.sbin/burncd')
-rw-r--r--usr.sbin/burncd/burncd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/burncd/burncd.c b/usr.sbin/burncd/burncd.c
index b60788b..ded8c19 100644
--- a/usr.sbin/burncd/burncd.c
+++ b/usr.sbin/burncd/burncd.c
@@ -119,7 +119,7 @@ main(int argc, char **argv)
if (strcasecmp("max", optarg) == 0)
speed = CDR_MAX_SPEED;
else
- speed = atoi(optarg) * 177;
+ speed = atoi(optarg);
if (speed <= 0)
errx(EX_USAGE, "Invalid speed: %s", optarg);
break;
@@ -148,6 +148,7 @@ main(int argc, char **argv)
if (ioctl(fd, CDRIOCGETBLOCKSIZE, &saved_block_size) < 0)
err(EX_IOERR, "ioctl(CDRIOCGETBLOCKSIZE)");
+ speed *= 177;
if (ioctl(fd, CDRIOCWRITESPEED, &speed) < 0)
err(EX_IOERR, "ioctl(CDRIOCWRITESPEED)");
OpenPOWER on IntegriCloud