FreeBSD Bugzilla – Attachment 20101 Details for
Bug 35512
ATA/ATAPI CD driver: impossible to set cd speed to magic value for "maximum speed"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 2.01 KB, created by
Philipp Mergenthaler
on 2002-03-03 10:40:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Philipp Mergenthaler
Created:
2002-03-03 10:40:01 UTC
Size:
2.01 KB
patch
obsolete
>Index: cdcontrol.1 >=================================================================== >RCS file: /ncvs/src/usr.sbin/cdcontrol/cdcontrol.1,v >retrieving revision 1.32 >diff -u -r1.32 cdcontrol.1 >--- cdcontrol.1 15 Jul 2001 08:01:46 -0000 1.32 >+++ cdcontrol.1 2 Mar 2002 21:20:28 -0000 >@@ -156,6 +156,11 @@ > Set LBA ioctl mode. > .It Cm quit > Quit the program. >+.It Cm speed Op Ar s >+Set the highest speed that the drive should use (default is single speed). >+This command is currently only supported on ATAPI drives. >+Note that reading CD data will use the speed set by this command >+but playing audio CDs might not. > .El > .Sh ENVIRONMENT > The following environment variables affect the execution of >Index: cdcontrol.c >=================================================================== >RCS file: /ncvs/src/usr.sbin/cdcontrol/cdcontrol.c,v >retrieving revision 1.37 >diff -u -r1.37 cdcontrol.c >--- cdcontrol.c 18 Feb 2002 20:35:27 -0000 1.37 >+++ cdcontrol.c 3 Mar 2002 01:42:27 -0000 >@@ -24,6 +24,7 @@ > #endif /* not lint */ > > #include <sys/cdio.h> >+#include <sys/cdrio.h> > #include <sys/file.h> > #include <sys/ioctl.h> > #include <sys/param.h> >@@ -73,6 +74,7 @@ > #define CMD_CDID 15 > #define CMD_NEXT 16 > #define CMD_PREVIOUS 17 >+#define CMD_SPEED 18 > #define STATUS_AUDIO 0x1 > #define STATUS_MEDIA 0x2 > #define STATUS_VOLUME 0x4 >@@ -105,6 +107,7 @@ > { CMD_VOLUME, "volume", 1, > "<l> <r> | left | right | mute | mono | stereo" }, > { CMD_CDID, "cdid", 2, "" }, >+{ CMD_SPEED, "speed", 2, "[speed]" }, > { 0, NULL, 0, NULL } > }; > >@@ -277,7 +280,7 @@ > > int run (int cmd, char *arg) > { >- int l, r, rc; >+ int l, r, rc, speed; > > switch (cmd) { > >@@ -425,6 +428,25 @@ > > return setvol (l, r); > >+ case CMD_SPEED: >+ if (fd < 0 && ! open_cd ()) >+ return (0); >+ >+ rc=sscanf (arg, "%d", &speed); >+ switch (rc) { >+ case EOF: >+ speed = 1; >+ break; >+ case 1: >+ break; >+ default: >+ warnx("invalid command arguments"); >+ return (0); >+ } >+ rc = ioctl (fd, CDRIOCREADSPEED, &speed); >+ >+ return (rc); >+ > default: > case CMD_HELP: > help ();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 35512
:
20100
| 20101