]> git.saurik.com Git - apple/xnu.git/blame - bsd/sys/loadable_fs.h
xnu-6153.41.3.tar.gz
[apple/xnu.git] / bsd / sys / loadable_fs.h
CommitLineData
1c79356b 1/*
5d5c5d0d
A
2 * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
3 *
2d21ac55 4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
0a7de745 5 *
2d21ac55
A
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. The rights granted to you under the License
10 * may not be used to create, or enable the creation or redistribution of,
11 * unlawful or unlicensed copies of an Apple operating system, or to
12 * circumvent, violate, or enable the circumvention or violation of, any
13 * terms of an Apple operating system software license agreement.
0a7de745 14 *
2d21ac55
A
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
0a7de745 17 *
2d21ac55
A
18 * The Original Code and all software distributed under the License are
19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
8f6c56a5
A
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
2d21ac55
A
22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 * Please see the License for the specific language governing rights and
24 * limitations under the License.
0a7de745 25 *
2d21ac55 26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
1c79356b
A
27 */
28/* @(#)loadable_fs.h 2.0 26/06/90 (c) 1990 NeXT */
29
30/* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
31 *
0a7de745 32 * 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
1c79356b
A
33 * U S E A T Y O U R O W N R I S K
34 *
35 * XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */
36
37
0a7de745 38/*
1c79356b
A
39 * loadable_fs.h - message struct for loading and initializing loadable
40 * file systems.
1c79356b
A
41 */
42
0a7de745 43#ifndef _SYS_LOADABLE_FS_
9bccf70c 44#define _SYS_LOADABLE_FS_
1c79356b
A
45
46
47/*
fe8ab488 48 * Constants for Loadable FS Utilities (in "/System/Library/Filesystems")
1c79356b
A
49 *
50 * Example of a /usr/filesystems directory
51 *
0a7de745 52 * /usr/filesystems/dos.fs/dos.util utility with which WSM
1c79356b 53 * communicates
0a7de745 54 * /usr/filesystems/dos.fs/dos.name "DOS Floppy"
1c79356b 55 * /usr/filesystems/dos.fs/dos_reloc actual loadable filesystem
0a7de745
A
56 * /usr/filesystems/dos.fs/dos.openfs.tiff "open folder" icon
57 * /usr/filesystems/dos.fs/dos.fs.tiff "closed folder" icon
1c79356b 58 */
0a7de745
A
59#define FS_DIR_LOCATION "/System/Library/Filesystems"
60#define FS_DIR_SUFFIX ".fs"
61#define FS_UTIL_SUFFIX ".util"
1c79356b
A
62
63/*
64 * .util program commands - all sent in the form "-p" or "-m" ... as argv[1].
65 */
0a7de745
A
66#define FSUC_PROBE 'p' /* probe FS for mount or init */
67/* example usage: foo.util -p fd0 removable writable */
1c79356b 68
0a7de745
A
69#define FSUC_PROBEFORINIT 'P' /* probe FS for init only */
70/* example usage: foo.util -P fd0 removable */
1c79356b 71
0a7de745
A
72#define FSUC_MOUNT 'm' /* mount FS */
73/* example usage: foo.util -m fd0 /bar removable writable */
1c79356b 74
0a7de745
A
75#define FSUC_REPAIR 'r' /* repair ('fsck') FS */
76/* example usage: foo.util -r fd0 removable */
1c79356b 77
0a7de745
A
78#define FSUC_UNMOUNT 'u' /* unmount FS */
79/* example usage: foo.util -u fd0 /bar */
1c79356b
A
80
81/* The following is not used by Workspace Manager */
0a7de745
A
82#define FSUC_MOUNT_FORCE 'M' /* like FSUC_MOUNT, but proceed even on
83 * error. */
1c79356b
A
84/*
85 * Return codes from .util program
86 */
0a7de745
A
87#define FSUR_RECOGNIZED (-1) /* response to FSUC_PROBE; implies that
88 * a mount is possible */
89#define FSUR_UNRECOGNIZED (-2) /* negative response to FSUC_PROBE */
90#define FSUR_IO_SUCCESS (-3) /* mount, unmount, repair succeeded */
91#define FSUR_IO_FAIL (-4) /* unrecoverable I/O error */
92#define FSUR_IO_UNCLEAN (-5) /* mount failed, file system not clean
93 */
94#define FSUR_INVAL (-6) /* invalid argument */
95#define FSUR_LOADERR (-7) /* kern_loader error */
96#define FSUR_INITRECOGNIZED (-8) /* response to FSUC_PROBE or
97 * FSUC_PROBEFORINIT, implies that
98 * initialization is possible */
1c79356b
A
99
100/*
101 * mount parameters passed from WSM to the .util program.
102 */
0a7de745
A
103#define DEVICE_READONLY "readonly"
104#define DEVICE_WRITABLE "writable"
1c79356b 105
0a7de745
A
106#define DEVICE_REMOVABLE "removable"
107#define DEVICE_FIXED "fixed"
1c79356b 108
0a7de745 109#endif /* _SYS_LOADABLE_FS_ */