]> git.saurik.com Git - apple/xnu.git/blame - bsd/sys/loadable_fs.h
xnu-344.21.73.tar.gz
[apple/xnu.git] / bsd / sys / loadable_fs.h
CommitLineData
1c79356b 1/*
9bccf70c 2 * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
1c79356b
A
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
d7e50217 6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
1c79356b 7 *
d7e50217
A
8 * This file contains Original Code and/or Modifications of Original Code
9 * as defined in and that are subject to the Apple Public Source License
10 * Version 2.0 (the 'License'). You may not use this file except in
11 * compliance with the License. Please obtain a copy of the License at
12 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * file.
14 *
15 * The Original Code and all software distributed under the License are
16 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
1c79356b
A
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
d7e50217
A
19 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
20 * Please see the License for the specific language governing rights and
21 * limitations under the License.
1c79356b
A
22 *
23 * @APPLE_LICENSE_HEADER_END@
24 */
25/* @(#)loadable_fs.h 2.0 26/06/90 (c) 1990 NeXT */
26
27/* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
28 *
29 * W I L L D R A S T I C A L L Y C H A N G E S O O N
30 * U S E A T Y O U R O W N R I S K
31 *
32 * XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */
33
34
35/*
36 * loadable_fs.h - message struct for loading and initializing loadable
37 * file systems.
1c79356b
A
38 */
39
9bccf70c
A
40#ifndef _SYS_LOADABLE_FS_
41#define _SYS_LOADABLE_FS_
1c79356b 42
9bccf70c 43#include <sys/appleapiopts.h>
1c79356b 44
9bccf70c 45#ifdef __APPLE_API_UNSTABLE
1c79356b
A
46/*
47 * Constants for Loadabls FS Utilities (in "/System/Library/Filesystems")
48 *
49 * Example of a /usr/filesystems directory
50 *
51 * /usr/filesystems/dos.fs/dos.util utility with which WSM
52 * communicates
53 * /usr/filesystems/dos.fs/dos.name "DOS Floppy"
54 * /usr/filesystems/dos.fs/dos_reloc actual loadable filesystem
55 * /usr/filesystems/dos.fs/dos.openfs.tiff "open folder" icon
56 * /usr/filesystems/dos.fs/dos.fs.tiff "closed folder" icon
57 */
58#define FS_DIR_LOCATION "/System/Library/Filesystems"
59#define FS_DIR_SUFFIX ".fs"
60#define FS_UTIL_SUFFIX ".util"
61#define FS_OPEN_SUFFIX ".openfs.tiff"
62#define FS_CLOSED_SUFFIX ".fs.tiff"
63#define FS_NAME_SUFFIX ".name"
64#define FS_LABEL_SUFFIX ".label"
65
66/*
67 * .util program commands - all sent in the form "-p" or "-m" ... as argv[1].
68 */
69#define FSUC_PROBE 'p' /* probe FS for mount or init */
70 /* example usage: foo.util -p fd0 removable writable */
71
72#define FSUC_PROBEFORINIT 'P' /* probe FS for init only */
73 /* example usage: foo.util -P fd0 removable */
74
75#define FSUC_MOUNT 'm' /* mount FS */
76 /* example usage: foo.util -m fd0 /bar removable writable */
77
78#define FSUC_REPAIR 'r' /* repair ('fsck') FS */
79 /* example usage: foo.util -r fd0 removable */
80
81#define FSUC_INITIALIZE 'i' /* initialize FS */
82 /* example usage: foo.util -i fd0 removable */
83
84#define FSUC_UNMOUNT 'u' /* unmount FS */
85 /* example usage: foo.util -u fd0 /bar */
86
87/* The following is not used by Workspace Manager */
88#define FSUC_MOUNT_FORCE 'M' /* like FSUC_MOUNT, but proceed even on
89 * error. */
90/*
91 * Return codes from .util program
92 */
93#define FSUR_RECOGNIZED (-1) /* response to FSUC_PROBE; implies that
94 * a mount is possible */
95#define FSUR_UNRECOGNIZED (-2) /* negative response to FSUC_PROBE */
96#define FSUR_IO_SUCCESS (-3) /* mount, unmount, repair succeeded */
97#define FSUR_IO_FAIL (-4) /* unrecoverable I/O error */
98#define FSUR_IO_UNCLEAN (-5) /* mount failed, file system not clean
99 */
100#define FSUR_INVAL (-6) /* invalid argument */
101#define FSUR_LOADERR (-7) /* kern_loader error */
102#define FSUR_INITRECOGNIZED (-8) /* response to FSUC_PROBE or
103 * FSUC_PROBEFORINIT, implies that
104 * initialization is possible */
105
106/*
107 * mount parameters passed from WSM to the .util program.
108 */
109#define DEVICE_READONLY "readonly"
110#define DEVICE_WRITABLE "writable"
111
112#define DEVICE_REMOVABLE "removable"
113#define DEVICE_FIXED "fixed"
114
115/*
116 * Additional parameters to the mount command - used by WSM when they
117 * appear in the /etc/mtab file.
118 */
119#define MNTOPT_FS "filesystem=" /* e.g. "filesystem=DOS" */
120#define MNTOPT_REMOVABLE "removable"
121
9bccf70c
A
122#endif /* __APPLE_API_UNSTABLE */
123#endif /* _SYS_LOADABLE_FS_ */