|
|
1.1 root 1: /*
2: * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
3: *
4: * @APPLE_LICENSE_HEADER_START@
5: *
6: * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
7: * Reserved. This file contains Original Code and/or Modifications of
8: * Original Code as defined in and that are subject to the Apple Public
9: * Source License Version 1.1 (the "License"). You may not use this file
10: * except in compliance with the License. Please obtain a copy of the
11: * License at http://www.apple.com/publicsource and read it before using
12: * this file.
13: *
14: * The Original Code and all software distributed under the License are
15: * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
16: * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
17: * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
18: * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
19: * License for the specific language governing rights and limitations
20: * under the License.
21: *
22: * @APPLE_LICENSE_HEADER_END@
23: */
24:
25: /* @(#)loadable_fs.h 2.0 26/06/90 (c) 1990 NeXT */
26:
27: /*
28: * loadable_fs.h - message struct for loading and initializing loadable
29: * file systems.
30: *
31: * HISTORY
32: * 26-Jun-90 Doug Mitchell at NeXT
33: * Created.
34: * 5-Nov-91 Lee Boynton at NeXT
35: * Added support for initialization, labels, and WSM options
36: */
37:
38: #ifndef _LOADABLE_FS_
39: #define _LOADABLE_FS_
40:
41: #import <mach/message.h>
42:
43: /*
44: * This message is used in an RPC between a lightweight app and a loaded
45: * kernel server.
46: */
47: struct load_fs_msg {
48: msg_header_t lfm_header;
49: msg_type_t lfm_status_t;
50: unsigned int lfm_status; /* status returned by server */
51: };
52:
53: /*
54: * msg_id values for load_fs_msg
55: */
56: #define LFM_ID 0x123456 /* base */
57: #define LFM_DUMP_MOUNT (LFM_ID+1) /* dump active FS and VNODE
58: * list */
59: #define LFM_TERMINATE (LFM_ID+2) /* terminate */
60: #define LFM_PURGE (LFM_ID+3) /* purge all vnodes except
61: * root */
62: #define LFM_DUMP_LOCAL (LFM_ID+4) /* dump local FS info */
63: #define LFM_ENABLE_TRACE (LFM_ID+5) /* enable debug trace */
64: #define LFM_DISABLE_TRACE (LFM_ID+6) /* disable debug trace */
65:
66: /*
67: * lfm_stat values
68: */
69: #define LFM_STAT_GOOD 0 /* file system loaded OK */
70: #define LFM_STAT_NOSPACE 1 /* no space in vfssw */
71: #define LFM_STAT_BADMSG 2 /* bad message received */
72: #define LFM_STAT_UNDEFINED 3
73:
74: /*
75: * Constants for Loadabls FS Utilities (in "/usr/FileSystems")
76: *
77: * Example of a /usr/filesystems directory
78: *
79: * /usr/filesystems/dos.fs/dos.util utility with which WSM
80: * communicates
81: * /usr/filesystems/dos.fs/dos.name "DOS Floppy"
82: * /usr/filesystems/dos.fs/dos_reloc actual loadable filesystem
83: * /usr/filesystems/dos.fs/dos.openfs.tiff "open folder" icon
84: * /usr/filesystems/dos.fs/dos.fs.tiff "closed folder" icon
85: */
86: #define FS_DIR_LOCATION "/usr/filesystems"
87: #define FS_DIR_SUFFIX ".fs"
88: #define FS_UTIL_SUFFIX ".util"
89: #define FS_OPEN_SUFFIX ".openfs.tiff"
90: #define FS_CLOSED_SUFFIX ".fs.tiff"
91: #define FS_NAME_SUFFIX ".name"
92: #define FS_LABEL_SUFFIX ".label"
93:
94: /*
95: * .util program commands - all sent in the form "-p" or "-m" ... as argv[1].
96: */
97: #define FSUC_PROBE 'p' /* probe FS for mount or init */
98: /* example usage: foo.util -p fd0 removable writable */
99:
100: #define FSUC_PROBEFORINIT 'P' /* probe FS for init only */
101: /* example usage: foo.util -P fd0 removable */
102:
103: #define FSUC_MOUNT 'm' /* mount FS */
104: /* example usage: foo.util -m fd0 /bar removable writable */
105:
106: #define FSUC_REPAIR 'r' /* repair ('fsck') FS */
107: /* example usage: foo.util -r fd0 removable */
108:
109: #define FSUC_INITIALIZE 'i' /* initialize FS */
110: /* example usage: foo.util -i fd0 removable */
111:
112: #define FSUC_UNMOUNT 'u' /* unmount FS */
113: /* example usage: foo.util -u fd0 /bar */
114:
115: /* The following is not used by Workspace Manager */
116: #define FSUC_MOUNT_FORCE 'M' /* like FSUC_MOUNT, but proceed even on
117: * error. */
118: /*
119: * Return codes from .util program
120: */
121: #define FSUR_RECOGNIZED (-1) /* response to FSUC_PROBE; implies that
122: * a mount is possible */
123: #define FSUR_UNRECOGNIZED (-2) /* negative response to FSUC_PROBE */
124: #define FSUR_IO_SUCCESS (-3) /* mount, unmount, repair succeeded */
125: #define FSUR_IO_FAIL (-4) /* unrecoverable I/O error */
126: #define FSUR_IO_UNCLEAN (-5) /* mount failed, file system not clean
127: */
128: #define FSUR_INVAL (-6) /* invalid argument */
129: #define FSUR_LOADERR (-7) /* kern_loader error */
130: #define FSUR_INITRECOGNIZED (-8) /* response to FSUC_PROBE or
131: * FSUC_PROBEFORINIT, implies that
132: * initialization is possible */
133:
134: /*
135: * mount parameters passed from WSM to the .util program.
136: */
137: #define DEVICE_READONLY "readonly"
138: #define DEVICE_WRITABLE "writable"
139:
140: #define DEVICE_REMOVABLE "removable"
141: #define DEVICE_FIXED "fixed"
142:
143: /*
144: * Additional parameters to the mount command - used by WSM when they
145: * appear in the /etc/mtab file.
146: */
147: #define MNTOPT_FS "filesystem=" /* e.g. "filesystem=DOS" */
148: #define MNTOPT_REMOVABLE "removable"
149:
150: #endif /* _LOADABLE_FS_ */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.