]>
Commit | Line | Data |
---|---|---|
1 | /* | |
2 | * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. | |
3 | * | |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
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 | |
11 | * file. | |
12 | * | |
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. | |
20 | * | |
21 | * @APPLE_LICENSE_HEADER_END@ | |
22 | */ | |
23 | /* @(#)loadable_fs.h 2.0 26/06/90 (c) 1990 NeXT */ | |
24 | ||
25 | /* XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | |
26 | * | |
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 | |
29 | * | |
30 | * XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX */ | |
31 | ||
32 | ||
33 | /* | |
34 | * loadable_fs.h - message struct for loading and initializing loadable | |
35 | * file systems. | |
36 | */ | |
37 | ||
38 | #ifndef _SYS_LOADABLE_FS_ | |
39 | #define _SYS_LOADABLE_FS_ | |
40 | ||
41 | ||
42 | /* | |
43 | * Constants for Loadabls FS Utilities (in "/System/Library/Filesystems") | |
44 | * | |
45 | * Example of a /usr/filesystems directory | |
46 | * | |
47 | * /usr/filesystems/dos.fs/dos.util utility with which WSM | |
48 | * communicates | |
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 | |
53 | */ | |
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" | |
61 | ||
62 | /* | |
63 | * .util program commands - all sent in the form "-p" or "-m" ... as argv[1]. | |
64 | */ | |
65 | #define FSUC_PROBE 'p' /* probe FS for mount or init */ | |
66 | /* example usage: foo.util -p fd0 removable writable */ | |
67 | ||
68 | #define FSUC_PROBEFORINIT 'P' /* probe FS for init only */ | |
69 | /* example usage: foo.util -P fd0 removable */ | |
70 | ||
71 | #define FSUC_MOUNT 'm' /* mount FS */ | |
72 | /* example usage: foo.util -m fd0 /bar removable writable */ | |
73 | ||
74 | #define FSUC_REPAIR 'r' /* repair ('fsck') FS */ | |
75 | /* example usage: foo.util -r fd0 removable */ | |
76 | ||
77 | #define FSUC_INITIALIZE 'i' /* initialize FS */ | |
78 | /* example usage: foo.util -i fd0 removable */ | |
79 | ||
80 | #define FSUC_UNMOUNT 'u' /* unmount FS */ | |
81 | /* example usage: foo.util -u fd0 /bar */ | |
82 | ||
83 | /* The following is not used by Workspace Manager */ | |
84 | #define FSUC_MOUNT_FORCE 'M' /* like FSUC_MOUNT, but proceed even on | |
85 | * error. */ | |
86 | /* | |
87 | * Return codes from .util program | |
88 | */ | |
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 | |
95 | */ | |
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 */ | |
101 | ||
102 | /* | |
103 | * mount parameters passed from WSM to the .util program. | |
104 | */ | |
105 | #define DEVICE_READONLY "readonly" | |
106 | #define DEVICE_WRITABLE "writable" | |
107 | ||
108 | #define DEVICE_REMOVABLE "removable" | |
109 | #define DEVICE_FIXED "fixed" | |
110 | ||
111 | /* | |
112 | * Additional parameters to the mount command - used by WSM when they | |
113 | * appear in the /etc/mtab file. | |
114 | */ | |
115 | #define MNTOPT_FS "filesystem=" /* e.g. "filesystem=DOS" */ | |
116 | #define MNTOPT_REMOVABLE "removable" | |
117 | ||
118 | #endif /* _SYS_LOADABLE_FS_ */ |