0001 .. SPDX-License-Identifier: GPL-2.0
0002
0003 ===============================
0004 Acorn Disc Filing System - ADFS
0005 ===============================
0006
0007 Filesystems supported by ADFS
0008 -----------------------------
0009
0010 The ADFS module supports the following Filecore formats which have:
0011
0012 - new maps
0013 - new directories or big directories
0014
0015 In terms of the named formats, this means we support:
0016
0017 - E and E+, with or without boot block
0018 - F and F+
0019
0020 We fully support reading files from these filesystems, and writing to
0021 existing files within their existing allocation. Essentially, we do
0022 not support changing any of the filesystem metadata.
0023
0024 This is intended to support loopback mounted Linux native filesystems
0025 on a RISC OS Filecore filesystem, but will allow the data within files
0026 to be changed.
0027
0028 If write support (ADFS_FS_RW) is configured, we allow rudimentary
0029 directory updates, specifically updating the access mode and timestamp.
0030
0031 Mount options for ADFS
0032 ----------------------
0033
0034 ============ ======================================================
0035 uid=nnn All files in the partition will be owned by
0036 user id nnn. Default 0 (root).
0037 gid=nnn All files in the partition will be in group
0038 nnn. Default 0 (root).
0039 ownmask=nnn The permission mask for ADFS 'owner' permissions
0040 will be nnn. Default 0700.
0041 othmask=nnn The permission mask for ADFS 'other' permissions
0042 will be nnn. Default 0077.
0043 ftsuffix=n When ftsuffix=0, no file type suffix will be applied.
0044 When ftsuffix=1, a hexadecimal suffix corresponding to
0045 the RISC OS file type will be added. Default 0.
0046 ============ ======================================================
0047
0048 Mapping of ADFS permissions to Linux permissions
0049 ------------------------------------------------
0050
0051 ADFS permissions consist of the following:
0052
0053 - Owner read
0054 - Owner write
0055 - Other read
0056 - Other write
0057
0058 (In older versions, an 'execute' permission did exist, but this
0059 does not hold the same meaning as the Linux 'execute' permission
0060 and is now obsolete).
0061
0062 The mapping is performed as follows::
0063
0064 Owner read -> -r--r--r--
0065 Owner write -> --w--w---w
0066 Owner read and filetype UnixExec -> ---x--x--x
0067 These are then masked by ownmask, eg 700 -> -rwx------
0068 Possible owner mode permissions -> -rwx------
0069
0070 Other read -> -r--r--r--
0071 Other write -> --w--w--w-
0072 Other read and filetype UnixExec -> ---x--x--x
0073 These are then masked by othmask, eg 077 -> ----rwxrwx
0074 Possible other mode permissions -> ----rwxrwx
0075
0076 Hence, with the default masks, if a file is owner read/write, and
0077 not a UnixExec filetype, then the permissions will be::
0078
0079 -rw-------
0080
0081 However, if the masks were ownmask=0770,othmask=0007, then this would
0082 be modified to::
0083
0084 -rw-rw----
0085
0086 There is no restriction on what you can do with these masks. You may
0087 wish that either read bits give read access to the file for all, but
0088 keep the default write protection (ownmask=0755,othmask=0577)::
0089
0090 -rw-r--r--
0091
0092 You can therefore tailor the permission translation to whatever you
0093 desire the permissions should be under Linux.
0094
0095 RISC OS file type suffix
0096 ------------------------
0097
0098 RISC OS file types are stored in bits 19..8 of the file load address.
0099
0100 To enable non-RISC OS systems to be used to store files without losing
0101 file type information, a file naming convention was devised (initially
0102 for use with NFS) such that a hexadecimal suffix of the form ,xyz
0103 denoted the file type: e.g. BasicFile,ffb is a BASIC (0xffb) file. This
0104 naming convention is now also used by RISC OS emulators such as RPCEmu.
0105
0106 Mounting an ADFS disc with option ftsuffix=1 will cause appropriate file
0107 type suffixes to be appended to file names read from a directory. If the
0108 ftsuffix option is zero or omitted, no file type suffixes will be added.