18c2ecf20Sopenharmony_ci.. SPDX-License-Identifier: GPL-2.0
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ci==================================
48c2ecf20Sopenharmony_ciMacintosh HFS Filesystem for Linux
58c2ecf20Sopenharmony_ci==================================
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ci.. Note:: This filesystem doesn't have a maintainer.
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ciHFS stands for ``Hierarchical File System`` and is the filesystem used
128c2ecf20Sopenharmony_ciby the Mac Plus and all later Macintosh models.  Earlier Macintosh
138c2ecf20Sopenharmony_cimodels used MFS (``Macintosh File System``), which is not supported,
148c2ecf20Sopenharmony_ciMacOS 8.1 and newer support a filesystem called HFS+ that's similar to
158c2ecf20Sopenharmony_ciHFS but is extended in various areas.  Use the hfsplus filesystem driver
168c2ecf20Sopenharmony_cito access such filesystems from Linux.
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ciMount options
208c2ecf20Sopenharmony_ci=============
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_ciWhen mounting an HFS filesystem, the following options are accepted:
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ci  creator=cccc, type=cccc
258c2ecf20Sopenharmony_ci	Specifies the creator/type values as shown by the MacOS finder
268c2ecf20Sopenharmony_ci	used for creating new files.  Default values: '????'.
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ci  uid=n, gid=n
298c2ecf20Sopenharmony_ci  	Specifies the user/group that owns all files on the filesystems.
308c2ecf20Sopenharmony_ci	Default:  user/group id of the mounting process.
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ci  dir_umask=n, file_umask=n, umask=n
338c2ecf20Sopenharmony_ci	Specifies the umask used for all files , all directories or all
348c2ecf20Sopenharmony_ci	files and directories.  Defaults to the umask of the mounting process.
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_ci  session=n
378c2ecf20Sopenharmony_ci  	Select the CDROM session to mount as HFS filesystem.  Defaults to
388c2ecf20Sopenharmony_ci	leaving that decision to the CDROM driver.  This option will fail
398c2ecf20Sopenharmony_ci	with anything but a CDROM as underlying devices.
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_ci  part=n
428c2ecf20Sopenharmony_ci  	Select partition number n from the devices.  Does only makes
438c2ecf20Sopenharmony_ci	sense for CDROMS because they can't be partitioned under Linux.
448c2ecf20Sopenharmony_ci	For disk devices the generic partition parsing code does this
458c2ecf20Sopenharmony_ci	for us.  Defaults to not parsing the partition table at all.
468c2ecf20Sopenharmony_ci
478c2ecf20Sopenharmony_ci  quiet
488c2ecf20Sopenharmony_ci  	Ignore invalid mount options instead of complaining.
498c2ecf20Sopenharmony_ci
508c2ecf20Sopenharmony_ci
518c2ecf20Sopenharmony_ciWriting to HFS Filesystems
528c2ecf20Sopenharmony_ci==========================
538c2ecf20Sopenharmony_ci
548c2ecf20Sopenharmony_ciHFS is not a UNIX filesystem, thus it does not have the usual features you'd
558c2ecf20Sopenharmony_ciexpect:
568c2ecf20Sopenharmony_ci
578c2ecf20Sopenharmony_ci * You can't modify the set-uid, set-gid, sticky or executable bits or the uid
588c2ecf20Sopenharmony_ci   and gid of files.
598c2ecf20Sopenharmony_ci * You can't create hard- or symlinks, device files, sockets or FIFOs.
608c2ecf20Sopenharmony_ci
618c2ecf20Sopenharmony_ciHFS does on the other have the concepts of multiple forks per file.  These
628c2ecf20Sopenharmony_cinon-standard forks are represented as hidden additional files in the normal
638c2ecf20Sopenharmony_cifilesystems namespace which is kind of a cludge and makes the semantics for
648c2ecf20Sopenharmony_cithe a little strange:
658c2ecf20Sopenharmony_ci
668c2ecf20Sopenharmony_ci * You can't create, delete or rename resource forks of files or the
678c2ecf20Sopenharmony_ci   Finder's metadata.
688c2ecf20Sopenharmony_ci * They are however created (with default values), deleted and renamed
698c2ecf20Sopenharmony_ci   along with the corresponding data fork or directory.
708c2ecf20Sopenharmony_ci * Copying files to a different filesystem will loose those attributes
718c2ecf20Sopenharmony_ci   that are essential for MacOS to work.
728c2ecf20Sopenharmony_ci
738c2ecf20Sopenharmony_ci
748c2ecf20Sopenharmony_ciCreating HFS filesystems
758c2ecf20Sopenharmony_ci========================
768c2ecf20Sopenharmony_ci
778c2ecf20Sopenharmony_ciThe hfsutils package from Robert Leslie contains a program called
788c2ecf20Sopenharmony_cihformat that can be used to create HFS filesystem. See
798c2ecf20Sopenharmony_ci<https://www.mars.org/home/rob/proj/hfs/> for details.
808c2ecf20Sopenharmony_ci
818c2ecf20Sopenharmony_ci
828c2ecf20Sopenharmony_ciCredits
838c2ecf20Sopenharmony_ci=======
848c2ecf20Sopenharmony_ci
858c2ecf20Sopenharmony_ciThe HFS drivers was written by Paul H. Hargrovea (hargrove@sccm.Stanford.EDU).
868c2ecf20Sopenharmony_ciRoman Zippel (roman@ardistech.com) rewrote large parts of the code and brought
878c2ecf20Sopenharmony_ciin btree routines derived from Brad Boyer's hfsplus driver.
88