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