View | Details | Raw Unified | Return to bug 35512 | Differences between
and this patch

Collapse All | Expand All

(-)cdcontrol.1 (+5 lines)
Lines 156-161 Link Here
156
Set LBA ioctl mode.
156
Set LBA ioctl mode.
157
.It Cm quit
157
.It Cm quit
158
Quit the program.
158
Quit the program.
159
.It Cm speed Op Ar s
160
Set the highest speed that the drive should use (default is single speed).
161
This command is currently only supported on ATAPI drives.
162
Note that reading CD data will use the speed set by this command
163
but playing audio CDs might not.
159
.El
164
.El
160
.Sh ENVIRONMENT
165
.Sh ENVIRONMENT
161
The following environment variables affect the execution of
166
The following environment variables affect the execution of
(-)cdcontrol.c (-1 / +23 lines)
Lines 24-29 Link Here
24
#endif /* not lint */
24
#endif /* not lint */
25
25
26
#include <sys/cdio.h>
26
#include <sys/cdio.h>
27
#include <sys/cdrio.h>
27
#include <sys/file.h>
28
#include <sys/file.h>
28
#include <sys/ioctl.h>
29
#include <sys/ioctl.h>
29
#include <sys/param.h>
30
#include <sys/param.h>
Lines 73-78 Link Here
73
#define CMD_CDID	15
74
#define CMD_CDID	15
74
#define CMD_NEXT	16
75
#define CMD_NEXT	16
75
#define CMD_PREVIOUS	17
76
#define CMD_PREVIOUS	17
77
#define CMD_SPEED	18
76
#define STATUS_AUDIO	0x1
78
#define STATUS_AUDIO	0x1
77
#define STATUS_MEDIA	0x2
79
#define STATUS_MEDIA	0x2
78
#define STATUS_VOLUME	0x4
80
#define STATUS_VOLUME	0x4
Lines 105-110 Link Here
105
{ CMD_VOLUME,	"volume",	1,
107
{ CMD_VOLUME,	"volume",	1,
106
      "<l> <r> | left | right | mute | mono | stereo" },
108
      "<l> <r> | left | right | mute | mono | stereo" },
107
{ CMD_CDID,	"cdid",		2, "" },
109
{ CMD_CDID,	"cdid",		2, "" },
110
{ CMD_SPEED,	"speed",	2, "[speed]" },
108
{ 0,		NULL,		0, NULL }
111
{ 0,		NULL,		0, NULL }
109
};
112
};
110
113
Lines 277-283 Link Here
277
280
278
int run (int cmd, char *arg)
281
int run (int cmd, char *arg)
279
{
282
{
280
	int l, r, rc;
283
	int l, r, rc, speed;
281
284
282
	switch (cmd) {
285
	switch (cmd) {
283
286
Lines 425-430 Link Here
425
428
426
		return setvol (l, r);
429
		return setvol (l, r);
427
430
431
	case CMD_SPEED:
432
		if (fd < 0 && ! open_cd ())
433
			return (0);
434
435
		rc=sscanf (arg, "%d", &speed);
436
		switch (rc) {
437
			case EOF:
438
				speed = 1;
439
				break;
440
			case 1:
441
				break;
442
			default:
443
				warnx("invalid command arguments");
444
				return (0);
445
		}
446
		rc = ioctl (fd, CDRIOCREADSPEED, &speed);
447
448
		return (rc);
449
		
428
	default:
450
	default:
429
	case CMD_HELP:
451
	case CMD_HELP:
430
		help ();
452
		help ();

Return to bug 35512