adfs.rst 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. .. SPDX-License-Identifier: GPL-2.0
  2. ===============================
  3. Acorn Disc Filing System - ADFS
  4. ===============================
  5. Filesystems supported by ADFS
  6. -----------------------------
  7. The ADFS module supports the following Filecore formats which have:
  8. - new maps
  9. - new directories or big directories
  10. In terms of the named formats, this means we support:
  11. - E and E+, with or without boot block
  12. - F and F+
  13. We fully support reading files from these filesystems, and writing to
  14. existing files within their existing allocation. Essentially, we do
  15. not support changing any of the filesystem metadata.
  16. This is intended to support loopback mounted Linux native filesystems
  17. on a RISC OS Filecore filesystem, but will allow the data within files
  18. to be changed.
  19. If write support (ADFS_FS_RW) is configured, we allow rudimentary
  20. directory updates, specifically updating the access mode and timestamp.
  21. Mount options for ADFS
  22. ----------------------
  23. ============ ======================================================
  24. uid=nnn All files in the partition will be owned by
  25. user id nnn. Default 0 (root).
  26. gid=nnn All files in the partition will be in group
  27. nnn. Default 0 (root).
  28. ownmask=nnn The permission mask for ADFS 'owner' permissions
  29. will be nnn. Default 0700.
  30. othmask=nnn The permission mask for ADFS 'other' permissions
  31. will be nnn. Default 0077.
  32. ftsuffix=n When ftsuffix=0, no file type suffix will be applied.
  33. When ftsuffix=1, a hexadecimal suffix corresponding to
  34. the RISC OS file type will be added. Default 0.
  35. ============ ======================================================
  36. Mapping of ADFS permissions to Linux permissions
  37. ------------------------------------------------
  38. ADFS permissions consist of the following:
  39. - Owner read
  40. - Owner write
  41. - Other read
  42. - Other write
  43. (In older versions, an 'execute' permission did exist, but this
  44. does not hold the same meaning as the Linux 'execute' permission
  45. and is now obsolete).
  46. The mapping is performed as follows::
  47. Owner read -> -r--r--r--
  48. Owner write -> --w--w---w
  49. Owner read and filetype UnixExec -> ---x--x--x
  50. These are then masked by ownmask, eg 700 -> -rwx------
  51. Possible owner mode permissions -> -rwx------
  52. Other read -> -r--r--r--
  53. Other write -> --w--w--w-
  54. Other read and filetype UnixExec -> ---x--x--x
  55. These are then masked by othmask, eg 077 -> ----rwxrwx
  56. Possible other mode permissions -> ----rwxrwx
  57. Hence, with the default masks, if a file is owner read/write, and
  58. not a UnixExec filetype, then the permissions will be::
  59. -rw-------
  60. However, if the masks were ownmask=0770,othmask=0007, then this would
  61. be modified to::
  62. -rw-rw----
  63. There is no restriction on what you can do with these masks. You may
  64. wish that either read bits give read access to the file for all, but
  65. keep the default write protection (ownmask=0755,othmask=0577)::
  66. -rw-r--r--
  67. You can therefore tailor the permission translation to whatever you
  68. desire the permissions should be under Linux.
  69. RISC OS file type suffix
  70. ------------------------
  71. RISC OS file types are stored in bits 19..8 of the file load address.
  72. To enable non-RISC OS systems to be used to store files without losing
  73. file type information, a file naming convention was devised (initially
  74. for use with NFS) such that a hexadecimal suffix of the form ,xyz
  75. denoted the file type: e.g. BasicFile,ffb is a BASIC (0xffb) file. This
  76. naming convention is now also used by RISC OS emulators such as RPCEmu.
  77. Mounting an ADFS disc with option ftsuffix=1 will cause appropriate file
  78. type suffixes to be appended to file names read from a directory. If the
  79. ftsuffix option is zero or omitted, no file type suffixes will be added.