diff options
Diffstat (limited to 'static/freebsd/man4/cd.4 3.html')
| -rw-r--r-- | static/freebsd/man4/cd.4 3.html | 294 |
1 files changed, 0 insertions, 294 deletions
diff --git a/static/freebsd/man4/cd.4 3.html b/static/freebsd/man4/cd.4 3.html deleted file mode 100644 index a091d660..00000000 --- a/static/freebsd/man4/cd.4 3.html +++ /dev/null @@ -1,294 +0,0 @@ -<table class="head"> - <tr> - <td class="head-ltitle">CD(4)</td> - <td class="head-vol">Device Drivers Manual</td> - <td class="head-rtitle">CD(4)</td> - </tr> -</table> -<div class="manual-text"> -<section class="Sh"> -<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1> -<p class="Pp"><code class="Nm">cd</code> — <span class="Nd">SCSI CD-ROM - driver</span></p> -</section> -<section class="Sh"> -<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1> -<p class="Pp"><code class="Cd">device cd</code></p> -</section> -<section class="Sh"> -<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1> -<p class="Pp">The <code class="Nm">cd</code> driver provides support for a SCSI - CD-ROM (Compact Disc-Read Only Memory) drive. In an attempt to look like a - regular disk, the <code class="Nm">cd</code> driver synthesizes a partition - table, with one partition covering the entire CD-ROM. It is possible to - modify this partition table using <a class="Xr">disklabel(8)</a>, but it - will only last until the CD-ROM is unmounted. In general the interfaces are - similar to those described by <a class="Xr">ada(4)</a> and - <a class="Xr">da(4)</a>.</p> -<p class="Pp">As the SCSI adapter is probed during boot, the SCSI bus is scanned - for devices. Any devices found which answer as CDROM (type 5) or WORM (type - 4) type devices will be `attached' to the <code class="Nm">cd</code> driver. - Prior to <span class="Ux">FreeBSD 2.1</span>, the first device found will be - attached as <code class="Li">cd0</code> the next, - <code class="Li">cd1</code>, etc. Beginning in <span class="Ux">FreeBSD - 2.1</span> it is possible to specify what cd unit a device should come on - line as; refer to <a class="Xr">scsi(4)</a> for details on kernel - configuration.</p> -<p class="Pp">The system utility <a class="Xr">disklabel(8)</a> may be used to - read the synthesized disk label structure, which will contain correct - figures for the size of the CD-ROM should that information be required.</p> -</section> -<section class="Sh"> -<h1 class="Sh" id="KERNEL_CONFIGURATION"><a class="permalink" href="#KERNEL_CONFIGURATION">KERNEL - CONFIGURATION</a></h1> -<p class="Pp">Any number of CD-ROM devices may be attached to the system - regardless of system configuration as all resources are dynamically - allocated.</p> -</section> -<section class="Sh"> -<h1 class="Sh" id="IOCTLS"><a class="permalink" href="#IOCTLS">IOCTLS</a></h1> -<p class="Pp">The following <a class="Xr">ioctl(2)</a> calls which apply to SCSI - CD-ROM drives are defined in the header files - <code class="In"><<a class="In">sys/cdio.h</a>></code> and - <code class="In"><<a class="In">sys/disklabel.h</a>></code>.</p> -<dl class="Bl-tag"> - <dt id="CDIOCPLAYTRACKS"><a class="permalink" href="#CDIOCPLAYTRACKS"><code class="Dv">CDIOCPLAYTRACKS</code></a></dt> - <dd>(<code class="Li">struct ioc_play_track</code>) Start audio playback given - a track address and length. The structure is defined as follows: - <div class="Bd Pp Bd-indent Li"> - <pre>struct ioc_play_track -{ - u_char start_track; - u_char start_index; - u_char end_track; - u_char end_index; -};</pre> - </div> - </dd> - <dt id="CDIOCPLAYBLOCKS"><a class="permalink" href="#CDIOCPLAYBLOCKS"><code class="Dv">CDIOCPLAYBLOCKS</code></a></dt> - <dd>(<code class="Li">struct ioc_play_blocks</code>) Start audio playback - given a block address and length. The structure is defined as follows: - <div class="Bd Pp Bd-indent Li"> - <pre>struct ioc_play_blocks -{ - int blk; - int len; -};</pre> - </div> - </dd> - <dt id="CDIOCPLAYMSF"><a class="permalink" href="#CDIOCPLAYMSF"><code class="Dv">CDIOCPLAYMSF</code></a></dt> - <dd>(<code class="Li">struct ioc_play_msf</code>) Start audio playback given a - `minutes-seconds-frames' address and length. The structure is defined as - follows: - <div class="Bd Pp Bd-indent Li"> - <pre>struct ioc_play_msf -{ - u_char start_m; - u_char start_s; - u_char start_f; - u_char end_m; - u_char end_s; - u_char end_f; -};</pre> - </div> - </dd> - <dt id="CDIOCREADSUBCHANNEL"><a class="permalink" href="#CDIOCREADSUBCHANNEL"><code class="Dv">CDIOCREADSUBCHANNEL</code></a></dt> - <dd>(<code class="Li">struct ioc_read_subchannel</code>) Read information from - the subchannel at the location specified by this structure: - <div class="Bd Pp Bd-indent Li"> - <pre>struct ioc_read_subchannel { - u_char address_format; -#define CD_LBA_FORMAT 1 -#define CD_MSF_FORMAT 2 - u_char data_format; -#define CD_SUBQ_DATA 0 -#define CD_CURRENT_POSITION 1 -#define CD_MEDIA_CATALOG 2 -#define CD_TRACK_INFO 3 - u_char track; - int data_len; - struct cd_sub_channel_info *data; -};</pre> - </div> - </dd> - <dt id="CDIOREADTOCHEADER"><a class="permalink" href="#CDIOREADTOCHEADER"><code class="Dv">CDIOREADTOCHEADER</code></a></dt> - <dd>(<code class="Li">struct ioc_toc_header</code>) Return summary information - about the table of contents for the mounted CD-ROM. The information is - returned into the following structure: - <div class="Bd Pp Bd-indent Li"> - <pre>struct ioc_toc_header { - u_short len; - u_char starting_track; - u_char ending_track; -};</pre> - </div> - </dd> - <dt id="CDIOREADTOCENTRYS"><a class="permalink" href="#CDIOREADTOCENTRYS"><code class="Dv">CDIOREADTOCENTRYS</code></a></dt> - <dd>(<code class="Li">struct ioc_read_toc_entry</code>) Return information - from the table of contents entries mentioned. (Yes, this command name is - misspelled.) The argument structure is defined as follows: - <div class="Bd Pp Bd-indent Li"> - <pre>struct ioc_read_toc_entry { - u_char address_format; - u_char starting_track; - u_short data_len; - struct cd_toc_entry *data; -};</pre> - </div> - The requested data is written into an area of size - <code class="Li">data_len</code> and pointed to by - <code class="Li">data</code>.</dd> - <dt id="CDIOCSETPATCH"><a class="permalink" href="#CDIOCSETPATCH"><code class="Dv">CDIOCSETPATCH</code></a></dt> - <dd>(<code class="Li">struct ioc_patch</code>) Attach various audio channels - to various output channels. The argument structure is defined thusly: - <div class="Bd Pp Bd-indent Li"> - <pre>struct ioc_patch { - u_char patch[4]; - /* one for each channel */ -};</pre> - </div> - </dd> - <dt id="CDIOCGETVOL"><a class="permalink" href="#CDIOCGETVOL"><code class="Dv">CDIOCGETVOL</code></a></dt> - <dd style="width: auto;"> </dd> - <dt id="CDIOCSETVOL"><a class="permalink" href="#CDIOCSETVOL"><code class="Dv">CDIOCSETVOL</code></a></dt> - <dd>(<code class="Li">struct ioc_vol</code>) Get (set) information about the - volume settings of the output channels. The argument structure is as - follows: - <div class="Bd Pp Bd-indent Li"> - <pre>struct ioc_vol -{ - u_char vol[4]; - /* one for each channel */ -};</pre> - </div> - </dd> - <dt id="CDIOCSETMONO"><a class="permalink" href="#CDIOCSETMONO"><code class="Dv">CDIOCSETMONO</code></a></dt> - <dd>Patch all output channels to all source channels.</dd> - <dt id="CDIOCSETSTEREO"><a class="permalink" href="#CDIOCSETSTEREO"><code class="Dv">CDIOCSETSTEREO</code></a></dt> - <dd>Patch left source channel to the left output channel and the right source - channel to the right output channel.</dd> - <dt id="CDIOCSETMUTE"><a class="permalink" href="#CDIOCSETMUTE"><code class="Dv">CDIOCSETMUTE</code></a></dt> - <dd>Mute output without changing the volume settings.</dd> - <dt id="CDIOCSETLEFT"><a class="permalink" href="#CDIOCSETLEFT"><code class="Dv">CDIOCSETLEFT</code></a></dt> - <dd style="width: auto;"> </dd> - <dt id="CDIOCSETRIGHT"><a class="permalink" href="#CDIOCSETRIGHT"><code class="Dv">CDIOCSETRIGHT</code></a></dt> - <dd>Attach both output channels to the left (right) source channel.</dd> - <dt id="CDIOCSETDEBUG"><a class="permalink" href="#CDIOCSETDEBUG"><code class="Dv">CDIOCSETDEBUG</code></a></dt> - <dd style="width: auto;"> </dd> - <dt id="CDIOCCLRDEBUG"><a class="permalink" href="#CDIOCCLRDEBUG"><code class="Dv">CDIOCCLRDEBUG</code></a></dt> - <dd>Turn on (off) debugging for the appropriate device.</dd> - <dt id="CDIOCPAUSE"><a class="permalink" href="#CDIOCPAUSE"><code class="Dv">CDIOCPAUSE</code></a></dt> - <dd style="width: auto;"> </dd> - <dt id="CDIOCRESUME"><a class="permalink" href="#CDIOCRESUME"><code class="Dv">CDIOCRESUME</code></a></dt> - <dd>Pause (resume) audio play, without resetting the location of the - read-head.</dd> - <dt id="CDIOCRESET"><a class="permalink" href="#CDIOCRESET"><code class="Dv">CDIOCRESET</code></a></dt> - <dd>Reset the drive.</dd> - <dt id="CDIOCSTART"><a class="permalink" href="#CDIOCSTART"><code class="Dv">CDIOCSTART</code></a></dt> - <dd style="width: auto;"> </dd> - <dt id="CDIOCSTOP"><a class="permalink" href="#CDIOCSTOP"><code class="Dv">CDIOCSTOP</code></a></dt> - <dd>Tell the drive to spin-up (-down) the CD-ROM.</dd> - <dt id="CDIOCALLOW"><a class="permalink" href="#CDIOCALLOW"><code class="Dv">CDIOCALLOW</code></a></dt> - <dd style="width: auto;"> </dd> - <dt id="CDIOCPREVENT"><a class="permalink" href="#CDIOCPREVENT"><code class="Dv">CDIOCPREVENT</code></a></dt> - <dd>Tell the drive to allow (prevent) manual ejection of the CD-ROM disc. Not - all drives support this feature.</dd> - <dt id="CDIOCEJECT"><a class="permalink" href="#CDIOCEJECT"><code class="Dv">CDIOCEJECT</code></a></dt> - <dd>Eject the CD-ROM.</dd> - <dt id="CDIOCCLOSE"><a class="permalink" href="#CDIOCCLOSE"><code class="Dv">CDIOCCLOSE</code></a></dt> - <dd>Tell the drive to close its door and load the media. Not all drives - support this feature.</dd> -</dl> -</section> -<section class="Sh"> -<h1 class="Sh" id="NOTES"><a class="permalink" href="#NOTES">NOTES</a></h1> -<p class="Pp">When a CD-ROM is changed in a drive controlled by the - <code class="Nm">cd</code> driver, then the act of changing the media will - invalidate the disklabel and information held within the kernel. To stop - corruption, all accesses to the device will be discarded until there are no - more open file descriptors referencing the device. During this period, all - new open attempts will be rejected. When no more open file descriptors - reference the device, the first next open will load a new set of parameters - (including disklabel) for the drive.</p> -<p class="Pp">The audio code in the <code class="Nm">cd</code> driver only - support SCSI-2 standard audio commands. As many CD-ROM manufacturers have - not followed the standard, there are many CD-ROM drives for which audio will - not work. Some work is planned to support some of the more common `broken' - CD-ROM drives; however, this is not yet under way.</p> -</section> -<section class="Sh"> -<h1 class="Sh" id="SYSCTL_VARIABLES"><a class="permalink" href="#SYSCTL_VARIABLES">SYSCTL - VARIABLES</a></h1> -<p class="Pp">The following variables are available as both - <a class="Xr">sysctl(8)</a> variables and <a class="Xr">loader(8)</a> - tunables:</p> -<dl class="Bl-tag"> - <dt>kern.cam.cd.retry_count</dt> - <dd> - <p class="Pp">This variable determines how many times the - <code class="Nm">cd</code> driver will retry a READ or WRITE command. - This does not affect the number of retries used during probe time or for - the <code class="Nm">cd</code> driver dump routine. This value currently - defaults to 4.</p> - </dd> - <dt>kern.cam.cd.%d.minimum_cmd_size</dt> - <dd> - <p class="Pp">The <code class="Nm">cd</code> driver attempts to - automatically determine whether the drive it is talking to supports 6 - byte or 10 byte MODE SENSE/MODE SELECT operations. Many SCSI drives only - support 6 byte commands, and ATAPI drives only support 10 byte commands. - The <code class="Nm">cd</code> driver first attempts to determine - whether the protocol in use typically supports 6 byte commands by - issuing a CAM Path Inquiry CCB. It will then default to 6 byte or 10 - byte commands as appropriate. After that, the <code class="Nm">cd</code> - driver defaults to using 6 byte commands (assuming the protocol the - drive speaks claims to support 6 byte commands), until one fails with a - SCSI ILLEGAL REQUEST error. Then it tries the 10 byte version of the - command to see if that works instead. Users can change the default via - per-drive sysctl variables and loader tunables. Where “%d” - is the unit number of the drive in question. Valid minimum command sizes - are 6 and 10. Any value above 6 will be rounded to 10, and any value - below 6 will be rounded to 6.</p> - </dd> -</dl> -</section> -<section class="Sh"> -<h1 class="Sh" id="FILES"><a class="permalink" href="#FILES">FILES</a></h1> -<dl class="Bl-tag Bl-compact"> - <dt><span class="Pa">/dev/cd[0-9][a-h]</span></dt> - <dd>raw mode CD-ROM devices</dd> -</dl> -</section> -<section class="Sh"> -<h1 class="Sh" id="DIAGNOSTICS"><a class="permalink" href="#DIAGNOSTICS">DIAGNOSTICS</a></h1> -<p class="Pp">None.</p> -</section> -<section class="Sh"> -<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE - ALSO</a></h1> -<p class="Pp"><a class="Xr">cam(4)</a>, <a class="Xr">cd9660(4)</a>, - <a class="Xr">da(4)</a>, <a class="Xr">disklabel(8)</a>, - <a class="Xr">cd(9)</a></p> -</section> -<section class="Sh"> -<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1> -<p class="Pp">This <code class="Nm">cd</code> driver is based upon the - <code class="Nm">cd</code> driver written by Julian Elischer, which appeared - in <span class="Ux">386BSD-0.1</span>. The CAM version of the - <code class="Nm">cd</code> driver was written by Kenneth Merry and first - appeared in <span class="Ux">FreeBSD 3.0</span>.</p> -</section> -<section class="Sh"> -<h1 class="Sh" id="BUGS"><a class="permalink" href="#BUGS">BUGS</a></h1> -<p class="Pp">The names of the structures used for the third argument to - <code class="Fn">ioctl</code>() were poorly chosen, and a number of spelling - errors have survived in the names of the <code class="Fn">ioctl</code>() - commands.</p> -</section> -</div> -<table class="foot"> - <tr> - <td class="foot-date">April 8, 2022</td> - <td class="foot-os">FreeBSD 15.0</td> - </tr> -</table> |
