dossrv 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. .TH DOSSRV 4
  2. .SH NAME
  3. dossrv, 9660srv, a:, b:, c:, d:, 9fat:, dosmnt, eject \- DOS and ISO9660 file systems
  4. .SH SYNOPSIS
  5. .B dossrv
  6. [
  7. .B -v
  8. ] [
  9. .B -r
  10. ] [
  11. .B -s
  12. ] [
  13. .B -f
  14. .I file
  15. ] [
  16. .I service
  17. ]
  18. .PP
  19. .B 9660srv
  20. [
  21. .B -9J
  22. ] [
  23. .B -v
  24. ] [
  25. .B -s
  26. ] [
  27. .B -f
  28. .I file
  29. ] [
  30. .I service
  31. ]
  32. .PP
  33. .B a:
  34. .PP
  35. .B b:
  36. .PP
  37. .B c:
  38. .PP
  39. .B 9fat:
  40. .PP
  41. .B dosmnt
  42. .I n
  43. .I mtpt
  44. .PP
  45. .B eject
  46. [
  47. .I n
  48. ]
  49. .SH DESCRIPTION
  50. .I Dossrv
  51. is a file server that interprets DOS file systems.
  52. A single instance of
  53. .I dossrv
  54. can provide access to multiple DOS disks simultaneously.
  55. .PP
  56. .I Dossrv
  57. posts a file descriptor named
  58. .I service
  59. (default
  60. .BR dos )
  61. in the
  62. .B /srv
  63. directory.
  64. To access the DOS file system on a device, use
  65. .B mount
  66. with the
  67. .I spec
  68. argument
  69. (see
  70. .IR bind (1))
  71. the name of the file holding raw DOS file system, typically the disk.
  72. If
  73. .I spec
  74. is undefined in the
  75. .BR mount ,
  76. .I dossrv
  77. will use
  78. .I file
  79. as the default name for the device holding the DOS system.
  80. .PP
  81. Normally
  82. .I dossrv
  83. creates a pipe to act as the communications channel between
  84. itself and its clients.
  85. The
  86. .B -s
  87. flag instructs
  88. .I dossrv
  89. to use its standard input and output instead.
  90. The kernels use this option if they are booting from a DOS disk.
  91. This flag also prevents the creation of an explicit service file in
  92. .BR /srv .
  93. .PP
  94. The
  95. .B -v
  96. flag causes verbose output for debugging, while
  97. the
  98. .B -r
  99. flag makes the file system read-only.
  100. .PP
  101. The shell script
  102. .I a:
  103. contains
  104. .IP
  105. .EX
  106. unmount /n/a: >[2] /dev/null
  107. mount -c /srv/dos /n/a: /dev/fd0disk
  108. .EE
  109. .LP
  110. and is therefore a shorthand for mounting a floppy disk in drive A.
  111. The scripts
  112. .I b:
  113. and
  114. .I dosmnt
  115. are similar,
  116. mounting the second floppy disk
  117. and the
  118. .IR n th
  119. non-floppy DOS partition,
  120. respectively.
  121. .I C:
  122. and
  123. .I d:
  124. call
  125. .I dosmnt
  126. in an attempt to name the drives in
  127. the same order that Microsoft operating systems do.
  128. .I 9fat:
  129. provides access to the FAT component of the Plan 9 partition (see
  130. .IR prep (8)).
  131. .PP
  132. The file attribute flags used by the DOS file system
  133. do not map directly to those used by Plan 9.
  134. Since there is no concept of user or group,
  135. permission changes via
  136. .B wstat
  137. (see
  138. .IR stat (2))
  139. will fail unless the same (read, write, execute) permissions
  140. are specified for user, group, and other.
  141. For example, removing write permission in Plan 9
  142. corresponds to setting the read-only
  143. attribute in the DOS file system.
  144. Most of the other DOS attributes
  145. are not accessible.
  146. .PP
  147. Setting the exclusive use flag (DMEXCL)
  148. in Plan 9 corresponds to setting the
  149. system use attribute in the DOS file system.
  150. Such files are not actually restricted to exclusive use,
  151. but do merit special treatment that
  152. helps in the creation of boot disks:
  153. when
  154. .I dossrv
  155. allocates a new block for such a file
  156. (caused, say, by a write that fills the file's
  157. last allocated block), it succeeds only if it can
  158. arrange for the file to be stored
  159. contiguously on disk.
  160. .PP
  161. Since other operating systems do not
  162. guarantee that system files are laid
  163. out contiguously, the DMAPPEND mode
  164. bit is set in file stat information
  165. only when the file is currently contiguous.
  166. Attempts to set the DMAPPEND mode bit
  167. explicitly will cause
  168. .I dossrv
  169. to try to make the file contiguous,
  170. succeeding only if this is possible.
  171. .PP
  172. .I 9660srv
  173. is similar to
  174. .I dossrv
  175. in specification, except that it interprets ISO9660 CD-ROM
  176. file systems instead of DOS file systems.
  177. Some CDs contain multiple directory trees describing
  178. the same set of files.
  179. .IR 9660srv 's
  180. first choice in such a case is a standard ISO9660 tree
  181. with Plan 9 system use fields;
  182. the second choice is a Microsoft ``Joliet'' tree, which
  183. allows long file names and Unicode characters;
  184. the third choice is a standard ISO9660 or High Sierra tree.
  185. The
  186. .B -9
  187. flag causes
  188. .I 9660srv
  189. to ignore the Plan 9 system use fields,
  190. while the
  191. .B -J
  192. flag causes it to
  193. ignore the Joliet tree.
  194. .PP
  195. If the floppy drive has an ejection motor,
  196. .I eject
  197. will spit out the floppy from drive
  198. .IR n ,
  199. default 0.
  200. .SH EXAMPLE
  201. Mount a floppy disk with a DOS file system on it.
  202. .IP
  203. .EX
  204. a:
  205. .EE
  206. .SH "SEE ALSO"
  207. .IR kfs (4)
  208. .SH SOURCE
  209. .B /sys/src/cmd/dossrv
  210. .br
  211. .B /sys/src/cmd/9660srv
  212. .br
  213. .B /rc/bin/eject
  214. .SH BUGS
  215. The overloading of the semantics of
  216. the DMEXCL and DMAPPEND
  217. bits can be confusing.