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