1
0

cdfs 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. .TH CDFS 4
  2. .SH NAME
  3. cdfs, cddb \- optical disc (CD, DVD, BD) track 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 disc (BD) drive should work.
  45. On DVDs and BDs, 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 can write discs
  64. and contains a writable disc, the top-level
  65. directory also contains an empty directory
  66. .B wd
  67. and, for CDs only,
  68. an empty directory
  69. .BR wa .
  70. Files created in these directories
  71. appear in the top-level directory
  72. as new data or audio tracks, respectively, regardless of name.
  73. .PP
  74. At any time, any number of tracks
  75. may be open for reading or a single track
  76. may be open for writing.
  77. Writing a disc track is a quasi-real-time operation:
  78. the disc writer should be kept saturated with
  79. new data to avoid buffer underruns,
  80. but modern drives will be told to cope with underruns transparently.
  81. To ensure saturation, copying from a file system
  82. stored on local disk or memory is recommended.
  83. .PP
  84. To fixate a disc (close a recordable disc by writing
  85. its permanent table of contents), simply
  86. remove the
  87. .B wa
  88. or
  89. .B wd
  90. directory.
  91. The directory removed selects whether
  92. the disc is fixated as an audio or data disc;
  93. since each track carries its own type information,
  94. very few readers care which fixation type was used.
  95. Rewritable discs do not require fixation.
  96. .PP
  97. The top level directory
  98. also contains a
  99. .B ctl
  100. file, into which control messages
  101. may be echoed.
  102. The current control messages are:
  103. .TF \fLquickblank
  104. .TP
  105. .B format
  106. Format the rewritable disc (\c
  107. .B -RW
  108. or
  109. .BR -RE )
  110. in the drive
  111. before initial use.
  112. .TP
  113. .B blank
  114. Blank the entire rewritable disc in the drive.
  115. .TP
  116. .B quickblank
  117. Blank only the table of contents on the rewritable
  118. disc in the drive.
  119. .\" .TP
  120. .\" .B closetracks
  121. .\" Close any open tracks on the current disc but do not finalize (fixate) the disc.
  122. .TP
  123. .B eject
  124. Eject the disc in the drive.
  125. .TP
  126. .B ingest
  127. Ingest a disc into the drive.
  128. .TP
  129. .B speed \fIkbps\fR
  130. Set the reading and writing speed to use,
  131. in units of 1,000-bytes-per-second.
  132. A value of
  133. .L best
  134. requests the optimal speed for the current drive and disc.
  135. CD
  136. .L 1x
  137. speed is 154;
  138. DVD
  139. .L 1x
  140. speed is 1350;
  141. BD
  142. .L 1x
  143. speed is 4608.
  144. Drives may round down the speed to one they support.
  145. To set reading and writing speeds separately,
  146. prefix the speeds with
  147. .B read
  148. or
  149. .BR write ,
  150. as in
  151. .B speed
  152. .B write
  153. .B 8192
  154. or
  155. .B speed
  156. .B read
  157. .B 16384
  158. .B write
  159. .BR 8192.
  160. Note that most drives reset the reading and writing speed
  161. each time a new disc is inserted.
  162. .PD
  163. .PP
  164. Reading the
  165. .B ctl
  166. file yields information about the drive.
  167. If the drive contains an audio CD, the first line
  168. will be an
  169. .B aux/cddb
  170. command that can be run to query
  171. an internet CD database
  172. to get a table of contents.
  173. Subsequent lines contain the current and maximum
  174. reading and writing speeds.
  175. Additional lines may further describe the current disc.
  176. .PP
  177. .I Aux/cddb
  178. takes 4 optional arguments.
  179. The
  180. .B -s
  181. option makes
  182. .I aux/cddb
  183. use
  184. .I server
  185. for the query instead of
  186. .LR freedb.freedb.org .
  187. The
  188. .B -D
  189. option causes the raw database response from the server to be dumped
  190. to standard output.
  191. The
  192. .B -t
  193. option causes the time of each track to be appended to the normal output.
  194. .B -T
  195. is like
  196. .B -t
  197. but prints a final line with the total time.
  198. .SH EXAMPLES
  199. Backup to a BD-R disc:
  200. .br
  201. .ne 3
  202. .IP
  203. .EX
  204. 9fs boot
  205. cdfs
  206. tar cf /mnt/cd/wd/x /n/boot
  207. .EE
  208. .br
  209. .ne 3
  210. .PP
  211. Copy the audio tracks from a CD:
  212. .IP
  213. .EX
  214. cdfs -d /dev/sd05
  215. mkdir /tmp/songs
  216. cp /mnt/cd/a* /tmp/songs
  217. .EE
  218. .PP
  219. Copy the tracks onto a blank CD inserted in the drive,
  220. and then fixate the disk as an audio CD.
  221. .IP
  222. .EX
  223. cp /tmp/songs/* /mnt/cd/wa
  224. rm /mnt/cd/wa
  225. .EE
  226. .SH SOURCE
  227. .B /sys/src/cmd/cdfs
  228. .SH SEE ALSO
  229. .IR sd (3),
  230. .I 9660srv
  231. (in
  232. .IR dossrv (4)),
  233. .IR mk9660 (8)
  234. .PD 0
  235. .TF "\fLhttp://www.t10.org\fP"
  236. .TP
  237. .B http://www.t10.org
  238. optical disc interface standards
  239. .PD
  240. .SH BUGS
  241. Fixating a BD-R disc records only the first track in the disc's TOC.
  242. Any other tracks are still there and their data accessible via
  243. .IR sd (3).
  244. There's no need to fixate data discs, except to prevent adding new tracks.
  245. .PP
  246. Closing a just-written DVD-R track can take minutes
  247. while the drive burns the unused part of the track reservation
  248. (for the whole disc).
  249. Thus only a single DVD-R track can be written on a DVD-R disc;
  250. use other media if you need more than one track per disc.
  251. .PP
  252. There are too many combinations of optical media, each with unique quirks,
  253. approximately
  254. the cross-product of these tuples:
  255. (CD DVD- DVD+ BD),
  256. (-ROM -R -RW),
  257. (single-layer dual-layer),
  258. plus oddities like DVD-RAM.
  259. Triple-layer BD drives and discs are starting to appear,
  260. likely to be followed by quad-layer.
  261. .PP
  262. Only MMC-compliant disc readers and writers
  263. are supported, but it would be easy to add
  264. support for early CD writers if desired.