cdfs 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. .TH CDFS 4
  2. .SH NAME
  3. cdfs, cddb \- optical disc (CD, DVD, BD) reader and writer file system
  4. .SH SYNOPSIS
  5. .B cdfs
  6. [
  7. .B -d
  8. .I sddev
  9. ] [
  10. .B -m
  11. .I mtpt
  12. ]
  13. .br
  14. .B "grep aux/cddb /mnt/cd/ctl | rc
  15. .br
  16. .B aux/cddb
  17. [
  18. .B -DTt
  19. ] [
  20. .B -s
  21. .I server
  22. ]
  23. .B query
  24. .I diskid
  25. .I ntracks
  26. .I track0id
  27. .I ...
  28. .SH DESCRIPTION
  29. .I Cdfs
  30. serves a one and a half level directory
  31. mounted at
  32. .I mtpt
  33. (default
  34. .BR /mnt/cd )
  35. that provides access to the tracks
  36. on discs placed in the disc reader or writer
  37. named by
  38. .I sddev
  39. (default
  40. .BR /dev/sdD0 ,
  41. see
  42. .IR sd (3)).
  43. Any MMC-compliant compact disc (CD), DVD,
  44. or Blu-ray (BD) drive should work.
  45. On DVD and BD discs, access to data tracks only is implemented.
  46. .PP
  47. The top level directory contains one file
  48. per disc track.
  49. The files are named
  50. .IR cNNN ,
  51. where
  52. .I c
  53. is a type character
  54. .RB ( a
  55. for audio tracks
  56. and
  57. .B d
  58. for data tracks)
  59. and
  60. .I NNN
  61. is the track number.
  62. .PP
  63. If the device is capable of writing discs
  64. and contains a writable disc, the top level
  65. directory also contains two empty 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 disc track is a real-time operation:
  77. the disc 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 or memory is recommended.
  81. .PP
  82. To fixate a disc (close a recordable disc 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 disc is fixated as an audio or data disc;
  91. since each track carries its own type information,
  92. very few readers care which fixation type was used.
  93. Rewritable discs do not require fixation.
  94. .PP
  95. The top level directory
  96. also contains a
  97. .B ctl
  98. file, into which control messages
  99. may be echoed.
  100. The current control messages are:
  101. .TF "\fLquickblan"
  102. .TP
  103. .B format
  104. Format the rewritable disc (\c
  105. .B -RW
  106. or
  107. .BR -RE )
  108. in the drive
  109. before initial use.
  110. .TP
  111. .B blank
  112. Blank the entire rewritable disc in the drive.
  113. .TP
  114. .B quickblank
  115. Blank only the table of contents on the rewritable
  116. disc in the drive.
  117. .TP
  118. .B eject
  119. Eject the disc in the drive.
  120. .TP
  121. .B ingest
  122. Ingest a disc into the drive.
  123. .TP
  124. .B speed \fIkpbs\fR
  125. Set the reading and writing speed to use.
  126. Drives may round down the speed to one they support.
  127. To set reading and writing speeds separately,
  128. prefix the speeds with
  129. .B read
  130. or
  131. .BR write ,
  132. as in
  133. .B speed
  134. .B write
  135. .B 8192
  136. or
  137. .B speed
  138. .B read
  139. .B 16384
  140. .B write
  141. .BR 8192.
  142. Note that most drives reset the reading and writing speed
  143. each time a new disc is inserted.
  144. .PD
  145. .PP
  146. Reading the
  147. .B ctl
  148. file yields information about the drive.
  149. If the drive contains an audio CD, the first line
  150. will be an
  151. .B aux/cddb
  152. command that can be run to query
  153. an internet CD database
  154. to get a table of contents.
  155. Subsequent lines contain the current and maximum
  156. reading and writing speeds.
  157. .PD
  158. .PP
  159. .I Aux/cddb
  160. takes 4 optional arguments.
  161. The
  162. .B -s
  163. option causes
  164. .I aux/cddb
  165. to use a different
  166. .I server
  167. for the query
  168. (default is
  169. .LR freedb.freedb.org ).
  170. The
  171. .B -D
  172. option causes the raw database response from the server to be dumped
  173. to standard output.
  174. The
  175. .B -t
  176. option causes the time of each track to be appended to the normal output.
  177. .B -T
  178. is like
  179. .B -t
  180. but prints a line with the total time at the end.
  181. .PD
  182. .SH EXAMPLE
  183. Backup to a BD-RW disc:
  184. .IP
  185. .EX
  186. 9fs boot
  187. cdfs
  188. tar cbf /mnt/cd/wd/x /n/boot
  189. .EE
  190. .br
  191. .ne 3
  192. .PP
  193. Copy the audio tracks from a CD:
  194. .IP
  195. .EX
  196. cdfs -d /dev/sd05
  197. mkdir /tmp/songs
  198. cp /mnt/cd/a* /tmp/songs
  199. .EE
  200. .PP
  201. Copy the tracks onto a blank CD inserted in the drive,
  202. and then fixate the disk as an audio CD.
  203. .IP
  204. .EX
  205. cp /tmp/songs/* /mnt/cd/wa
  206. rm /mnt/cd/wa
  207. .EE
  208. .SH SOURCE
  209. .B /sys/src/cmd/cdfs
  210. .SH SEE ALSO
  211. .TF "\fLhttp://www.t10.org\fP"
  212. .TP
  213. .B http://www.t10.org
  214. optical disc interface standards
  215. .PP
  216. .PD
  217. .IR sd (3),
  218. .I 9660srv
  219. (in
  220. .IR dossrv (4)),
  221. .IR mk9660 (8)
  222. .SH BUGS
  223. There are too many combinations of optical media, approximately
  224. the cross-product of these tuples:
  225. (CD DVD- DVD+ BD),
  226. (single-layer dual-layer),
  227. (ROM -R -RW).
  228. .PP
  229. Packet (incremental) writing is not yet implemented.
  230. .PP
  231. Only MMC-compliant disc readers and writers
  232. are supported, but it would be easy to add
  233. support for early CD writers if desired.