blob: 5b22cae38e5e83717dea18520f19448b8a41c90a [file] [log] [blame]
Mauro Carvalho Chehab34873902020-02-17 17:11:48 +01001.. SPDX-License-Identifier: GPL-2.0
2
3===============================
4Acorn Disc Filing System - ADFS
5===============================
6
Russell King76ed99d2019-12-09 11:11:43 +00007Filesystems supported by ADFS
8-----------------------------
9
10The ADFS module supports the following Filecore formats which have:
11
12- new maps
13- new directories or big directories
14
15In terms of the named formats, this means we support:
16
17- E and E+, with or without boot block
18- F and F+
19
20We fully support reading files from these filesystems, and writing to
21existing files within their existing allocation. Essentially, we do
22not support changing any of the filesystem metadata.
23
24This is intended to support loopback mounted Linux native filesystems
25on a RISC OS Filecore filesystem, but will allow the data within files
26to be changed.
27
28If write support (ADFS_FS_RW) is configured, we allow rudimentary
29directory updates, specifically updating the access mode and timestamp.
30
Linus Torvalds1da177e2005-04-16 15:20:36 -070031Mount options for ADFS
32----------------------
33
Mauro Carvalho Chehab34873902020-02-17 17:11:48 +010034 ============ ======================================================
Linus Torvalds1da177e2005-04-16 15:20:36 -070035 uid=nnn All files in the partition will be owned by
36 user id nnn. Default 0 (root).
Matt LaPlante4ae0edc2006-11-30 04:58:40 +010037 gid=nnn All files in the partition will be in group
Linus Torvalds1da177e2005-04-16 15:20:36 -070038 nnn. Default 0 (root).
39 ownmask=nnn The permission mask for ADFS 'owner' permissions
40 will be nnn. Default 0700.
41 othmask=nnn The permission mask for ADFS 'other' permissions
42 will be nnn. Default 0077.
Stuart Swalesda23ef02011-03-22 16:35:06 -070043 ftsuffix=n When ftsuffix=0, no file type suffix will be applied.
44 When ftsuffix=1, a hexadecimal suffix corresponding to
45 the RISC OS file type will be added. Default 0.
Mauro Carvalho Chehab34873902020-02-17 17:11:48 +010046 ============ ======================================================
Linus Torvalds1da177e2005-04-16 15:20:36 -070047
48Mapping of ADFS permissions to Linux permissions
49------------------------------------------------
50
51 ADFS permissions consist of the following:
52
Mauro Carvalho Chehab34873902020-02-17 17:11:48 +010053 - Owner read
54 - Owner write
55 - Other read
56 - Other write
Linus Torvalds1da177e2005-04-16 15:20:36 -070057
58 (In older versions, an 'execute' permission did exist, but this
Mauro Carvalho Chehab34873902020-02-17 17:11:48 +010059 does not hold the same meaning as the Linux 'execute' permission
60 and is now obsolete).
Linus Torvalds1da177e2005-04-16 15:20:36 -070061
Mauro Carvalho Chehab34873902020-02-17 17:11:48 +010062 The mapping is performed as follows::
Linus Torvalds1da177e2005-04-16 15:20:36 -070063
64 Owner read -> -r--r--r--
65 Owner write -> --w--w---w
66 Owner read and filetype UnixExec -> ---x--x--x
67 These are then masked by ownmask, eg 700 -> -rwx------
68 Possible owner mode permissions -> -rwx------
69
70 Other read -> -r--r--r--
71 Other write -> --w--w--w-
72 Other read and filetype UnixExec -> ---x--x--x
73 These are then masked by othmask, eg 077 -> ----rwxrwx
74 Possible other mode permissions -> ----rwxrwx
75
76 Hence, with the default masks, if a file is owner read/write, and
Mauro Carvalho Chehab34873902020-02-17 17:11:48 +010077 not a UnixExec filetype, then the permissions will be::
Linus Torvalds1da177e2005-04-16 15:20:36 -070078
79 -rw-------
80
81 However, if the masks were ownmask=0770,othmask=0007, then this would
Mauro Carvalho Chehab34873902020-02-17 17:11:48 +010082 be modified to::
83
Linus Torvalds1da177e2005-04-16 15:20:36 -070084 -rw-rw----
85
86 There is no restriction on what you can do with these masks. You may
87 wish that either read bits give read access to the file for all, but
Mauro Carvalho Chehab34873902020-02-17 17:11:48 +010088 keep the default write protection (ownmask=0755,othmask=0577)::
Linus Torvalds1da177e2005-04-16 15:20:36 -070089
90 -rw-r--r--
91
92 You can therefore tailor the permission translation to whatever you
93 desire the permissions should be under Linux.
Stuart Swalesda23ef02011-03-22 16:35:06 -070094
95RISC OS file type suffix
96------------------------
97
98 RISC OS file types are stored in bits 19..8 of the file load address.
99
100 To enable non-RISC OS systems to be used to store files without losing
101 file type information, a file naming convention was devised (initially
102 for use with NFS) such that a hexadecimal suffix of the form ,xyz
103 denoted the file type: e.g. BasicFile,ffb is a BASIC (0xffb) file. This
104 naming convention is now also used by RISC OS emulators such as RPCEmu.
105
106 Mounting an ADFS disc with option ftsuffix=1 will cause appropriate file
107 type suffixes to be appended to file names read from a directory. If the
108 ftsuffix option is zero or omitted, no file type suffixes will be added.