1
0

cdfs 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. .TH CDFS 4
  2. .SH NAME
  3. cdfs, cddb \- CD reader and writer file system
  4. .SH SYNOPSIS
  5. .B cdfs
  6. [
  7. .B -d
  8. .I sddev
  9. ]
  10. [
  11. .B -m
  12. .I mtpt
  13. ]
  14. .br
  15. .B "grep aux/cddb /mnt/cd/ctl | rc
  16. .br
  17. .B aux/cddb
  18. [
  19. .B -DTt
  20. ]
  21. [
  22. .B -s
  23. .I server
  24. ]
  25. .B query
  26. .I diskid
  27. .I ntracks
  28. .I track0id
  29. .I ...
  30. .SH DESCRIPTION
  31. .I Cdfs
  32. serves a one and a half level directory
  33. mounted at
  34. .I mtpt
  35. (default
  36. .BR /mnt/cd )
  37. that provides access to the tracks
  38. on CDs placed in the CD reader or writer
  39. named by
  40. .I sddev
  41. (default
  42. .BR /dev/sdD0 ,
  43. see
  44. .IR sd (3)).
  45. .PP
  46. The top level directory contains one file
  47. per CD track.
  48. The files are named
  49. .IR cNNN ,
  50. where
  51. .I c
  52. is a type character
  53. .RB ( a
  54. for audio tracks
  55. and
  56. .B d
  57. for data tracks)
  58. and
  59. .I NNN
  60. is the track number.
  61. .PP
  62. If the device is capable of writing CDs
  63. and contains a writable CD, the top level
  64. directory also contains two empty
  65. directories
  66. .B wa
  67. and
  68. .BR wd .
  69. Files created in these directories
  70. appear in the top level directory
  71. as new audio or data tracks, regardless of name.
  72. .PP
  73. At any time, any number of tracks
  74. may be open for reading or a single track
  75. may be open for writing.
  76. Writing a CD track is a real-time operation:
  77. the CD writer must be kept saturated with
  78. new data to avoid buffer underruns.
  79. To ensure this, copying from a file system
  80. stored on local disk is recommended.
  81. .PP
  82. To fixate a CD (close a writable CD by writing
  83. its permanent table of contents), simply
  84. remove the
  85. .B wa
  86. or
  87. .B wd
  88. directory.
  89. The directory removed selects whether
  90. the CD is fixated as an audio or data CD;
  91. since each track carries its own type information,
  92. very few readers care which fixation type was used.
  93. .PP
  94. The top level directory
  95. also contains a
  96. .B ctl
  97. file, into which control messages
  98. may be echoed.
  99. The current control messages are:
  100. .TF "\fLquickblank "
  101. .TP
  102. .B blank
  103. Blank the entire rewritable CD in the drive.
  104. .TP
  105. .B quickblank
  106. Blank only the table of contents on the rewritable
  107. CD in the drive.
  108. .TP
  109. .B eject
  110. Eject the CD in the drive.
  111. .TP
  112. .B ingest
  113. Ingest a CD into the drive.
  114. .TP
  115. .B speed \fIkpbs\fR
  116. Set the reading and writing speed to use.
  117. Drives may round down the speed to one they support.
  118. To set reading and writing speeds separately,
  119. prefix the speeds with
  120. .B read
  121. or
  122. .BR write ,
  123. as in
  124. .B speed
  125. .B write
  126. .B 8192
  127. or
  128. .B speed
  129. .B read
  130. .B 16384
  131. .B write
  132. .BR 8192.
  133. Note that most drives reset the reading and writing speed
  134. each time a new CD is inserted.
  135. .PD
  136. .PP
  137. Reading the
  138. .B ctl
  139. file yields information about the drive.
  140. If the drive contains an audio CD, the first line
  141. will be an
  142. .B aux/cddb
  143. command that can be run to query
  144. an internet CD database
  145. to get a table of contents.
  146. Subsequent lines contain the current and maximum
  147. reading and writing speeds.
  148. .PD
  149. .PP
  150. .I Aux/cddb takes 4 optional arguments.
  151. The
  152. .B -s server
  153. option causes
  154. .I aux/cddb
  155. to use a different server for the query
  156. (default is
  157. .IR freedb.freedb.org ).
  158. The
  159. .B -D
  160. option causes the raw database response from the server to be dumped
  161. to standard output.
  162. The
  163. .I -t
  164. option causes the time of each track to be appended to the normal output.
  165. .I -T
  166. is like
  167. .I -t
  168. but prints a line with the total time at the end.
  169. .PD
  170. .PP
  171. Only MMC-compliant CD readers and writers
  172. are supported, but it would be easy to add
  173. support for early CD writers if desired.
  174. .SH EXAMPLE
  175. Copy the audio tracks from a CD:
  176. .IP
  177. .EX
  178. cdfs -d /dev/sd05
  179. mkdir /tmp/songs
  180. cp /mnt/cd/a* /tmp/songs
  181. .EE
  182. .PP
  183. Copy the tracks onto a blank CD inserted in the drive,
  184. and then fixate the disk as an audio CD.
  185. .IP
  186. .EX
  187. cp /tmp/songs/* /mnt/cd/wa
  188. rm /mnt/cd/wa
  189. .EE
  190. .SH SOURCE
  191. .B /sys/src/cmd/cdfs
  192. .SH SEE ALSO
  193. .IR sd (3),
  194. .I 9660srv
  195. (in
  196. .IR dossrv (4)),
  197. .IR mk9660 (8)
  198. .SH BUGS
  199. There should be support for DVDs.