xref: /haiku/headers/private/fs_shell/fssh_api_wrapper.h (revision 4a57f843964b2598ff06ba9a15e206a0a72a82ff)
1 /*
2  * Copyright 2007-2010, Ingo Weinhold, ingo_weinhold@gmx.de.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef _FSSH_API_WRAPPER_H
6 #define _FSSH_API_WRAPPER_H
7 
8 
9 #include <stdlib.h>
10 
11 #include "fssh_dirent.h"
12 #include "fssh_errno.h"
13 #include "fssh_fcntl.h"
14 #include "fssh_stat.h"
15 #include "fssh_stdio.h"
16 #include "fssh_string.h"
17 #include "fssh_time.h"
18 #include "fssh_uio.h"
19 #include "fssh_unistd.h"
20 
21 #include "fssh_atomic.h"
22 #include "fssh_byte_order.h"
23 #include "fssh_defs.h"
24 #include "fssh_disk_device_defs.h"
25 #include "fssh_disk_device_manager.h"
26 #include "fssh_driver_settings.h"
27 #include "fssh_drivers.h"
28 #include "fssh_errors.h"
29 #include "fssh_fs_attr.h"
30 #include "fssh_fs_cache.h"
31 #include "fssh_fs_index.h"
32 #include "fssh_fs_info.h"
33 #include "fssh_fs_interface.h"
34 #include "fssh_fs_query.h"
35 #include "fssh_fs_volume.h"
36 #include "fssh_kernel_export.h"
37 #include "fssh_lock.h"
38 #include "fssh_module.h"
39 #include "fssh_node_monitor.h"
40 #include "fssh_os.h"
41 #include "fssh_type_constants.h"
42 #include "fssh_types.h"
43 
44 #include "DoublyLinkedList.h"
45 #include "SinglyLinkedList.h"
46 #include "Stack.h"
47 
48 
49 ////////////////////////////////////////////////////////////////////////////////
50 // #pragma mark - fssh_atomic.h
51 
52 #define atomic_set			fssh_atomic_set
53 #define atomic_test_and_set	fssh_atomic_test_and_set
54 #define atomic_add			fssh_atomic_add
55 #define atomic_and			fssh_atomic_and
56 #define atomic_or			fssh_atomic_or
57 #define atomic_get			fssh_atomic_get
58 
59 
60 ////////////////////////////////////////////////////////////////////////////////
61 // #pragma mark - fssh_bytes_order.h
62 
63 // swap directions
64 #define B_SWAP_HOST_TO_LENDIAN	FSSH_B_SWAP_HOST_TO_LENDIAN
65 #define B_SWAP_HOST_TO_BENDIAN	FSSH_B_SWAP_HOST_TO_BENDIAN
66 #define B_SWAP_LENDIAN_TO_HOST	FSSH_B_SWAP_LENDIAN_TO_HOST
67 #define B_SWAP_BENDIAN_TO_HOST	FSSH_B_SWAP_BENDIAN_TO_HOST
68 #define B_SWAP_ALWAYS			FSSH_B_SWAP_ALWAYS
69 
70 #define swap_action	fssh_swap_action
71 
72 // BSD/networking macros
73 #define htonl(x)	fssh_htonl(x)
74 #define ntohl(x)	fssh_ntohl(x)
75 #define htons(x)	fssh_htons(x)
76 #define ntohs(x)	fssh_ntohs(x)
77 
78 // always swap macros
79 #define B_SWAP_DOUBLE(arg)	FSSH_B_SWAP_DOUBLE(arg)
80 #define B_SWAP_FLOAT(arg)	FSSH_B_SWAP_FLOAT(arg)
81 #define B_SWAP_INT64(arg)	FSSH_B_SWAP_INT64(arg)
82 #define B_SWAP_INT32(arg)	FSSH_B_SWAP_INT32(arg)
83 #define B_SWAP_INT16(arg)	FSSH_B_SWAP_INT16(arg)
84 
85 #define B_HOST_IS_LENDIAN	FSSH_B_HOST_IS_LENDIAN
86 #define B_HOST_IS_BENDIAN	FSSH_B_HOST_IS_BENDIAN
87 
88 // Host native to little endian
89 #define B_HOST_TO_LENDIAN_DOUBLE(arg)	FSSH_B_HOST_TO_LENDIAN_DOUBLE(arg)
90 #define B_HOST_TO_LENDIAN_FLOAT(arg)	FSSH_B_HOST_TO_LENDIAN_FLOAT(arg)
91 #define B_HOST_TO_LENDIAN_INT64(arg)	FSSH_B_HOST_TO_LENDIAN_INT64(arg)
92 #define B_HOST_TO_LENDIAN_INT32(arg)	FSSH_B_HOST_TO_LENDIAN_INT32(arg)
93 #define B_HOST_TO_LENDIAN_INT16(arg)	FSSH_B_HOST_TO_LENDIAN_INT16(arg)
94 
95 // Little endian to host native
96 #define B_LENDIAN_TO_HOST_DOUBLE(arg)	FSSH_B_LENDIAN_TO_HOST_DOUBLE(arg)
97 #define B_LENDIAN_TO_HOST_FLOAT(arg)	FSSH_B_LENDIAN_TO_HOST_FLOAT(arg)
98 #define B_LENDIAN_TO_HOST_INT64(arg)	FSSH_B_LENDIAN_TO_HOST_INT64(arg)
99 #define B_LENDIAN_TO_HOST_INT32(arg)	FSSH_B_LENDIAN_TO_HOST_INT32(arg)
100 #define B_LENDIAN_TO_HOST_INT16(arg)	FSSH_B_LENDIAN_TO_HOST_INT16(arg)
101 
102 // Host native to big endian
103 #define B_HOST_TO_BENDIAN_DOUBLE(arg)	FSSH_B_HOST_TO_BENDIAN_DOUBLE(arg)
104 #define B_HOST_TO_BENDIAN_FLOAT(arg)	FSSH_B_HOST_TO_BENDIAN_FLOAT(arg)
105 #define B_HOST_TO_BENDIAN_INT64(arg)	FSSH_B_HOST_TO_BENDIAN_INT64(arg)
106 #define B_HOST_TO_BENDIAN_INT32(arg)	FSSH_B_HOST_TO_BENDIAN_INT32(arg)
107 #define B_HOST_TO_BENDIAN_INT16(arg)	FSSH_B_HOST_TO_BENDIAN_INT16(arg)
108 
109 // Big endian to host native
110 #define B_BENDIAN_TO_HOST_DOUBLE(arg)	FSSH_B_BENDIAN_TO_HOST_DOUBLE(arg)
111 #define B_BENDIAN_TO_HOST_FLOAT(arg)	FSSH_B_BENDIAN_TO_HOST_FLOAT(arg)
112 #define B_BENDIAN_TO_HOST_INT64(arg)	FSSH_B_BENDIAN_TO_HOST_INT64(arg)
113 #define B_BENDIAN_TO_HOST_INT32(arg)	FSSH_B_BENDIAN_TO_HOST_INT32(arg)
114 #define B_BENDIAN_TO_HOST_INT16(arg)	FSSH_B_BENDIAN_TO_HOST_INT16(arg)
115 
116 #define swap_data			fssh_swap_data
117 #define is_type_swapped		fssh_is_type_swapped
118 
119 
120 // Private implementations
121 #define __swap_double		__fssh_swap_double
122 #define __swap_float		__fssh_swap_float
123 #define __swap_int64		__fssh_swap_int64
124 #define __swap_int32		__fssh_swap_int32
125 #define __swap_int16		__fssh_swap_int16
126 
127 
128 ////////////////////////////////////////////////////////////////////////////////
129 // #pragma mark - fssh_defs.h
130 
131 // 32/64 bitness
132 #undef B_HAIKU_32_BIT
133 #undef B_HAIKU_64_BIT
134 #ifdef FSSH_B_HAIKU_64_BIT
135 #	define B_HAIKU_64_BIT		FSSH_B_HAIKU_64_BIT
136 #endif
137 #ifdef FSSH_B_HAIKU_32_BIT
138 #	define B_HAIKU_32_BIT		FSSH_B_HAIKU_32_BIT
139 #endif
140 
141 // Limits
142 #define B_DEV_NAME_LENGTH	FSSH_B_DEV_NAME_LENGTH
143 #define B_FILE_NAME_LENGTH	FSSH_B_FILE_NAME_LENGTH
144 #define B_PATH_NAME_LENGTH	FSSH_B_PATH_NAME_LENGTH
145 #define B_ATTR_NAME_LENGTH	FSSH_B_ATTR_NAME_LENGTH
146 #define B_MIME_TYPE_LENGTH	FSSH_B_MIME_TYPE_LENGTH
147 #define B_MAX_SYMLINKS		FSSH_B_MAX_SYMLINKS
148 
149 // Open Modes
150 #define B_READ_ONLY			FSSH_B_READ_ONLY
151 #define B_WRITE_ONLY		FSSH_B_WRITE_ONLY
152 #define B_READ_WRITE		FSSH_B_READ_WRITE
153 
154 #define	B_FAIL_IF_EXISTS	FSSH_B_FAIL_IF_EXISTS
155 #define B_CREATE_FILE		FSSH_B_CREATE_FILE
156 #define B_ERASE_FILE		FSSH_B_ERASE_FILE
157 #define B_OPEN_AT_END		FSSH_B_OPEN_AT_END
158 
159 // Node Flavors
160 #define node_flavor			fssh_node_flavor
161 #define	B_FILE_NODE			FSSH_B_FILE_NODE
162 #define	B_SYMLINK_NODE		FSSH_B_SYMLINK_NODE
163 #define	B_DIRECTORY_NODE	FSSH_B_DIRECTORY_NODE
164 #define	B_ANY_NODE			FSSH_B_ANY_NODE
165 
166 #undef	offsetof
167 #define offsetof(type,member)	fssh_offsetof(type,member)
168 
169 #define min_c(a,b)				fssh_min_c(a,b)
170 #define max_c(a,b)				fssh_max_c(a,b)
171 
172 #undef	_PACKED
173 #define _PACKED	_FSSH_PACKED
174 
175 
176 ////////////////////////////////////////////////////////////////////////////////
177 // #pragma mark - fssh_dirent.h
178 
179 #define dirent		fssh_dirent
180 #define dirent_t	fssh_dirent_t
181 
182 #define DIR			fssh_DIR
183 
184 
185 
186 ////////////////////////////////////////////////////////////////////////////////
187 // #pragma mark - fssh_disk_device_defs.h
188 
189 #define partition_id	fssh_partition_id
190 #define disk_system_id	fssh_disk_system_id
191 #define disk_job_id		fssh_disk_job_id
192 
193 // partition flags
194 #define B_PARTITION_IS_DEVICE			FSSH_B_PARTITION_IS_DEVICE
195 #define B_PARTITION_FILE_SYSTEM			FSSH_B_PARTITION_FILE_SYSTEM
196 #define B_PARTITION_PARTITIONING_SYSTEM	FSSH_B_PARTITION_PARTITIONING_SYSTEM
197 #define B_PARTITION_READ_ONLY			FSSH_B_PARTITION_READ_ONLY
198 #define B_PARTITION_MOUNTED				FSSH_B_PARTITION_MOUNTED
199 #define B_PARTITION_BUSY				FSSH_B_PARTITION_BUSY
200 #define B_PARTITION_DESCENDANT_BUSY		FSSH_B_PARTITION_DESCENDANT_BUSY
201 
202 // partition statuses
203 #define B_PARTITION_VALID			FSSH_B_PARTITION_VALID
204 #define B_PARTITION_CORRUPT			FSSH_B_PARTITION_CORRUPT
205 #define B_PARTITION_UNRECOGNIZED	FSSH_B_PARTITION_UNRECOGNIZED
206 #define B_PARTITION_UNINITIALIZED	FSSH_B_PARTITION_UNINITIALIZED
207 
208 // partition change flags
209 #define B_PARTITION_CHANGED_OFFSET				FSSH_B_PARTITION_CHANGED_OFFSET
210 #define B_PARTITION_CHANGED_SIZE				FSSH_B_PARTITION_CHANGED_SIZE
211 #define B_PARTITION_CHANGED_CONTENT_SIZE		FSSH_B_PARTITION_CHANGED_CONTENT_SIZE
212 #define B_PARTITION_CHANGED_BLOCK_SIZE			FSSH_B_PARTITION_CHANGED_BLOCK_SIZE
213 #define B_PARTITION_CHANGED_STATUS				FSSH_B_PARTITION_CHANGED_STATUS
214 #define B_PARTITION_CHANGED_FLAGS				FSSH_B_PARTITION_CHANGED_FLAGS
215 #define B_PARTITION_CHANGED_VOLUME				FSSH_B_PARTITION_CHANGED_VOLUME
216 #define B_PARTITION_CHANGED_NAME				FSSH_B_PARTITION_CHANGED_NAME
217 #define B_PARTITION_CHANGED_CONTENT_NAME		FSSH_B_PARTITION_CHANGED_CONTENT_NAME
218 #define B_PARTITION_CHANGED_TYPE				FSSH_B_PARTITION_CHANGED_TYPE
219 #define B_PARTITION_CHANGED_CONTENT_TYPE		FSSH_B_PARTITION_CHANGED_CONTENT_TYPE
220 #define B_PARTITION_CHANGED_PARAMETERS			FSSH_B_PARTITION_CHANGED_PARAMETERS
221 #define B_PARTITION_CHANGED_CONTENT_PARAMETERS	FSSH_B_PARTITION_CHANGED_CONTENT_PARAMETERS
222 #define B_PARTITION_CHANGED_CHILDREN			FSSH_B_PARTITION_CHANGED_CHILDREN
223 #define B_PARTITION_CHANGED_DESCENDANTS			FSSH_B_PARTITION_CHANGED_DESCENDANTS
224 #define B_PARTITION_CHANGED_DEFRAGMENTATION		FSSH_B_PARTITION_CHANGED_DEFRAGMENTATION
225 #define B_PARTITION_CHANGED_CHECK				FSSH_B_PARTITION_CHANGED_CHECK
226 #define B_PARTITION_CHANGED_REPAIR				FSSH_B_PARTITION_CHANGED_REPAIR
227 #define B_PARTITION_CHANGED_INITIALIZATION		FSSH_B_PARTITION_CHANGED_INITIALIZATION
228 
229 // disk device flags
230 #define B_DISK_DEVICE_REMOVABLE		FSSH_B_DISK_DEVICE_REMOVABLE
231 #define B_DISK_DEVICE_HAS_MEDIA		FSSH_B_DISK_DEVICE_HAS_MEDIA
232 #define B_DISK_DEVICE_READ_ONLY		FSSH_B_DISK_DEVICE_READ_ONLY
233 #define B_DISK_DEVICE_WRITE_ONCE	FSSH_B_DISK_DEVICE_WRITE_ONCE
234 
235 // disk system flags
236 #define B_DISK_SYSTEM_IS_FILE_SYSTEM	FSSH_B_DISK_SYSTEM_IS_FILE_SYSTEM
237 
238 // flags common for both file and partitioning systems
239 #define B_DISK_SYSTEM_SUPPORTS_CHECKING						FSSH_B_DISK_SYSTEM_SUPPORTS_CHECKING
240 #define B_DISK_SYSTEM_SUPPORTS_REPAIRING					FSSH_B_DISK_SYSTEM_SUPPORTS_REPAIRING
241 #define B_DISK_SYSTEM_SUPPORTS_RESIZING						FSSH_B_DISK_SYSTEM_SUPPORTS_RESIZING
242 #define B_DISK_SYSTEM_SUPPORTS_MOVING						FSSH_B_DISK_SYSTEM_SUPPORTS_MOVING
243 #define B_DISK_SYSTEM_SUPPORTS_SETTING_CONTENT_NAME			FSSH_B_DISK_SYSTEM_SUPPORTS_SETTING_CONTENT_NAME
244 #define B_DISK_SYSTEM_SUPPORTS_SETTING_CONTENT_PARAMETERS	FSSH_B_DISK_SYSTEM_SUPPORTS_SETTING_CONTENT_PARAMETERS
245 #define B_DISK_SYSTEM_SUPPORTS_INITIALIZING					FSSH_B_DISK_SYSTEM_SUPPORTS_INITIALIZING
246 #define B_DISK_SYSTEM_SUPPORTS_CONTENT_NAME					FSSH_B_DISK_SYSTEM_SUPPORTS_CONTENT_NAME
247 
248 // file system specific flags
249 #define B_DISK_SYSTEM_SUPPORTS_DEFRAGMENTING							FSSH_B_DISK_SYSTEM_SUPPORTS_DEFRAGMENTING
250 #define B_DISK_SYSTEM_SUPPORTS_DEFRAGMENTING_WHILE_MOUNTED				FSSH_B_DISK_SYSTEM_SUPPORTS_DEFRAGMENTING_WHILE_MOUNTED
251 #define B_DISK_SYSTEM_SUPPORTS_CHECKING_WHILE_MOUNTED					FSSH_B_DISK_SYSTEM_SUPPORTS_CHECKING_WHILE_MOUNTED
252 #define B_DISK_SYSTEM_SUPPORTS_REPAIRING_WHILE_MOUNTED					FSSH_B_DISK_SYSTEM_SUPPORTS_REPAIRING_WHILE_MOUNTED
253 #define B_DISK_SYSTEM_SUPPORTS_RESIZING_WHILE_MOUNTED					FSSH_B_DISK_SYSTEM_SUPPORTS_RESIZING_WHILE_MOUNTED
254 #define B_DISK_SYSTEM_SUPPORTS_MOVING_WHILE_MOUNTED						FSSH_B_DISK_SYSTEM_SUPPORTS_MOVING_WHILE_MOUNTED
255 #define B_DISK_SYSTEM_SUPPORTS_SETTING_CONTENT_NAME_WHILE_MOUNTED		FSSH_B_DISK_SYSTEM_SUPPORTS_SETTING_CONTENT_NAME_WHILE_MOUNTED
256 #define B_DISK_SYSTEM_SUPPORTS_SETTING_CONTENT_PARAMETERS_WHILE_MOUNTED	FSSH_B_DISK_SYSTEM_SUPPORTS_SETTING_CONTENT_PARAMETERS_WHILE_MOUNTED
257 #define B_DISK_SYSTEM_SUPPORTS_WRITING									FSSH_B_DISK_SYSTEM_SUPPORTS_WRITING
258 
259 // partitioning system specific flags
260 #define B_DISK_SYSTEM_SUPPORTS_RESIZING_CHILD		FSSH_B_DISK_SYSTEM_SUPPORTS_RESIZING_CHILD
261 #define B_DISK_SYSTEM_SUPPORTS_MOVING_CHILD			FSSH_B_DISK_SYSTEM_SUPPORTS_MOVING_CHILD
262 #define B_DISK_SYSTEM_SUPPORTS_SETTING_NAME			FSSH_B_DISK_SYSTEM_SUPPORTS_SETTING_NAME
263 #define B_DISK_SYSTEM_SUPPORTS_SETTING_TYPE			FSSH_B_DISK_SYSTEM_SUPPORTS_SETTING_TYPE
264 #define B_DISK_SYSTEM_SUPPORTS_SETTING_PARAMETERS	FSSH_B_DISK_SYSTEM_SUPPORTS_SETTING_PARAMETERS
265 #define B_DISK_SYSTEM_SUPPORTS_CREATING_CHILD		FSSH_B_DISK_SYSTEM_SUPPORTS_CREATING_CHILD
266 #define B_DISK_SYSTEM_SUPPORTS_DELETING_CHILD		FSSH_B_DISK_SYSTEM_SUPPORTS_DELETING_CHILD
267 #define B_DISK_SYSTEM_SUPPORTS_NAME					FSSH_B_DISK_SYSTEM_SUPPORTS_NAME
268 
269 // disk device job types
270 #define B_DISK_DEVICE_JOB_BAD_TYPE				FSSH_B_DISK_DEVICE_JOB_BAD_TYPE
271 #define B_DISK_DEVICE_JOB_DEFRAGMENT			FSSH_B_DISK_DEVICE_JOB_DEFRAGMENT
272 #define B_DISK_DEVICE_JOB_REPAIR				FSSH_B_DISK_DEVICE_JOB_REPAIR
273 #define B_DISK_DEVICE_JOB_RESIZE				FSSH_B_DISK_DEVICE_JOB_RESIZE
274 #define B_DISK_DEVICE_JOB_MOVE					FSSH_B_DISK_DEVICE_JOB_MOVE
275 #define B_DISK_DEVICE_JOB_SET_NAME				FSSH_B_DISK_DEVICE_JOB_SET_NAME
276 #define B_DISK_DEVICE_JOB_SET_CONTENT_NAME		FSSH_B_DISK_DEVICE_JOB_SET_CONTENT_NAME
277 #define B_DISK_DEVICE_JOB_SET_TYPE				FSSH_B_DISK_DEVICE_JOB_SET_TYPE
278 #define B_DISK_DEVICE_JOB_SET_PARMETERS			FSSH_B_DISK_DEVICE_JOB_SET_PARMETERS
279 #define B_DISK_DEVICE_JOB_SET_CONTENT_PARMETERS	FSSH_B_DISK_DEVICE_JOB_SET_CONTENT_PARMETERS
280 #define B_DISK_DEVICE_JOB_INITIALIZE			FSSH_B_DISK_DEVICE_JOB_INITIALIZE
281 #define B_DISK_DEVICE_JOB_UNINITIALIZE			FSSH_B_DISK_DEVICE_JOB_UNINITIALIZE
282 #define B_DISK_DEVICE_JOB_CREATE				FSSH_B_DISK_DEVICE_JOB_CREATE
283 #define B_DISK_DEVICE_JOB_DELETE				FSSH_B_DISK_DEVICE_JOB_DELETE
284 #define B_DISK_DEVICE_JOB_SCAN					FSSH_B_DISK_DEVICE_JOB_SCAN
285 
286 // disk device job statuses
287 #define B_DISK_DEVICE_JOB_UNINITIALIZED	FSSH_B_DISK_DEVICE_JOB_UNINITIALIZED
288 #define B_DISK_DEVICE_JOB_SCHEDULED		FSSH_B_DISK_DEVICE_JOB_SCHEDULED
289 #define B_DISK_DEVICE_JOB_IN_PROGRESS	FSSH_B_DISK_DEVICE_JOB_IN_PROGRESS
290 #define B_DISK_DEVICE_JOB_SUCCEEDED		FSSH_B_DISK_DEVICE_JOB_SUCCEEDED
291 #define B_DISK_DEVICE_JOB_FAILED		FSSH_B_DISK_DEVICE_JOB_FAILED
292 #define B_DISK_DEVICE_JOB_CANCELED		FSSH_B_DISK_DEVICE_JOB_CANCELED
293 
294 #define disk_device_job_progress_info	fssh_disk_device_job_progress_info
295 
296 // disk device job interrupt properties
297 #define B_DISK_DEVICE_JOB_CAN_CANCEL		FSSH_B_DISK_DEVICE_JOB_CAN_CANCEL
298 #define B_DISK_DEVICE_JOB_STOP_ON_CANCEL	FSSH_B_DISK_DEVICE_JOB_STOP_ON_CANCEL
299 #define B_DISK_DEVICE_JOB_REVERSE_ON_CANCEL	FSSH_B_DISK_DEVICE_JOB_REVERSE_ON_CANCEL
300 #define B_DISK_DEVICE_JOB_CAN_PAUSE			FSSH_B_DISK_DEVICE_JOB_CAN_PAUSE
301 
302 // string length constants, all of which include the NULL terminator
303 #define B_DISK_DEVICE_TYPE_LENGTH	FSSH_B_DISK_DEVICE_TYPE_LENGTH
304 #define B_DISK_DEVICE_NAME_LENGTH	FSSH_B_DISK_DEVICE_NAME_LENGTH
305 #define B_DISK_SYSTEM_NAME_LENGTH	FSSH_B_DISK_SYSTEM_NAME_LENGTH
306 
307 // max size of parameter string buffers, including NULL terminator
308 #define B_DISK_DEVICE_MAX_PARAMETER_SIZE	FSSH_B_DISK_DEVICE_MAX_PARAMETER_SIZE
309 
310 
311 ////////////////////////////////////////////////////////////////////////////////
312 // #pragma mark - fssh_disk_device_manager.h
313 
314 #define partition_data				fssh_partition_data
315 #define disk_device_data			fssh_disk_device_data
316 #define partitionable_space_data	fssh_partitionable_space_data
317 
318 // operations on partitions
319 #define B_PARTITION_DEFRAGMENT				FSSH_B_PARTITION_DEFRAGMENT
320 #define B_PARTITION_REPAIR					FSSH_B_PARTITION_REPAIR
321 #define B_PARTITION_RESIZE					FSSH_B_PARTITION_RESIZE
322 #define B_PARTITION_RESIZE_CHILD			FSSH_B_PARTITION_RESIZE_CHILD
323 #define B_PARTITION_MOVE					FSSH_B_PARTITION_MOVE
324 #define B_PARTITION_MOVE_CHILD				FSSH_B_PARTITION_MOVE_CHILD
325 #define B_PARTITION_SET_NAME				FSSH_B_PARTITION_SET_NAME
326 #define B_PARTITION_SET_CONTENT_NAME		FSSH_B_PARTITION_SET_CONTENT_NAME
327 #define B_PARTITION_SET_TYPE				FSSH_B_PARTITION_SET_TYPE
328 #define B_PARTITION_SET_PARAMETERS			FSSH_B_PARTITION_SET_PARAMETERS
329 #define B_PARTITION_SET_CONTENT_PARAMETERS	FSSH_B_PARTITION_SET_CONTENT_PARAMETERS
330 #define B_PARTITION_INITIALIZE				FSSH_B_PARTITION_INITIALIZE
331 #define B_PARTITION_CREATE_CHILD			FSSH_B_PARTITION_CREATE_CHILD
332 #define B_PARTITION_DELETE_CHILD			FSSH_B_PARTITION_DELETE_CHILD
333 
334 // disk device job cancel status
335 #define B_DISK_DEVICE_JOB_CONTINUE	FSSH_B_DISK_DEVICE_JOB_CONTINUE
336 #define B_DISK_DEVICE_JOB_CANCEL	FSSH_B_DISK_DEVICE_JOB_CANCEL
337 #define B_DISK_DEVICE_JOB_REVERSE	FSSH_B_DISK_DEVICE_JOB_REVERSE
338 
339 // disk device locking
340 #define write_lock_disk_device		fssh_write_lock_disk_device
341 #define write_unlock_disk_device	fssh_write_unlock_disk_device
342 #define read_lock_disk_device		fssh_read_lock_disk_device
343 #define read_unlock_disk_device		fssh_read_unlock_disk_device
344 
345 // getting disk devices/partitions by path
346 #define find_disk_device	fssh_find_disk_device
347 #define find_partition		fssh_find_partition
348 
349 // disk device/partition read access
350 #define get_disk_device			fssh_get_disk_device
351 #define get_partition			fssh_get_partition
352 #define get_parent_partition	fssh_get_parent_partition
353 #define get_child_partition		fssh_get_child_partition
354 
355 // partition write access
356 #define create_child_partition	fssh_create_child_partition
357 #define delete_partition		fssh_delete_partition
358 #define partition_modified		fssh_partition_modified
359 
360 #define scan_partition			fssh_scan_partition
361 
362 // disk systems
363 #define find_disk_system		fssh_find_disk_system
364 
365 // jobs
366 #define update_disk_device_job_progress				fssh_update_disk_device_job_progress
367 #define update_disk_device_job_extra_progress		fssh_update_disk_device_job_extra_progress
368 #define set_disk_device_job_error_message			fssh_set_disk_device_job_error_message
369 #define update_disk_device_job_interrupt_properties	fssh_update_disk_device_job_interrupt_properties
370 
371 
372 ////////////////////////////////////////////////////////////////////////////////
373 // #pragma mark - fssh_driver_settings.h
374 
375 #define driver_parameter	fssh_driver_parameter
376 #define driver_settings		fssh_driver_settings
377 
378 #define load_driver_settings			fssh_load_driver_settings
379 #define unload_driver_settings			fssh_unload_driver_settings
380 #define parse_driver_settings_string	fssh_parse_driver_settings_string
381 #define get_driver_settings_string		fssh_get_driver_settings_string
382 #define delete_driver_settings			fssh_delete_driver_settings
383 #define get_driver_parameter			fssh_get_driver_parameter
384 #define get_driver_boolean_parameter	fssh_get_driver_boolean_parameter
385 #define get_driver_settings				fssh_get_driver_settings
386 
387 #define B_SAFEMODE_DRIVER_SETTINGS	FSSH_B_SAFEMODE_DRIVER_SETTINGS
388 #define B_SAFEMODE_SAFE_MODE		FSSH_B_SAFEMODE_SAFE_MODE
389 
390 
391 ////////////////////////////////////////////////////////////////////////////////
392 // #pragma mark - fssh_drivers.h
393 
394 #define device_open_hook		fssh_device_open_hook
395 #define device_close_hook		fssh_device_close_hook
396 #define device_free_hook		fssh_device_free_hook
397 #define device_control_hook		fssh_device_control_hook
398 #define device_read_hook		fssh_device_read_hook
399 #define device_write_hook		fssh_device_write_hook
400 #define device_select_hook		fssh_device_select_hook
401 #define device_deselect_hook	fssh_device_deselect_hook
402 #define device_read_pages_hook	fssh_device_read_pages_hook
403 #define device_write_pages_hook	fssh_device_write_pages_hook
404 
405 #define B_CUR_DRIVER_API_VERSION	FSSH_B_CUR_DRIVER_API_VERSION
406 
407 #define device_hooks	fssh_device_hooks
408 
409 #define init_hardware	fssh_init_hardware
410 #define publish_devices	fssh_publish_devices
411 #define find_device		fssh_find_device
412 #define init_driver		fssh_init_driver
413 #define uninit_driver	fssh_uninit_driver
414 
415 #define api_version		fssh_api_version
416 
417 #define B_GET_DEVICE_SIZE			FSSH_B_GET_DEVICE_SIZE
418 #define B_SET_DEVICE_SIZE			FSSH_B_SET_DEVICE_SIZE
419 #define B_SET_NONBLOCKING_IO		FSSH_B_SET_NONBLOCKING_IO
420 #define B_SET_BLOCKING_IO			FSSH_B_SET_BLOCKING_IO
421 #define B_GET_READ_STATUS			FSSH_B_GET_READ_STATUS
422 #define B_GET_WRITE_STATUS			FSSH_B_GET_WRITE_STATUS
423 #define B_GET_GEOMETRY				FSSH_B_GET_GEOMETRY
424 #define B_GET_DRIVER_FOR_DEVICE		FSSH_B_GET_DRIVER_FOR_DEVICE
425 #define B_GET_PARTITION_INFO		FSSH_B_GET_PARTITION_INFO
426 #define B_SET_PARTITION				FSSH_B_SET_PARTITION
427 #define B_FORMAT_DEVICE				FSSH_B_FORMAT_DEVICE
428 #define B_EJECT_DEVICE				FSSH_B_EJECT_DEVICE
429 #define B_GET_ICON					FSSH_B_GET_ICON
430 #define B_GET_BIOS_GEOMETRY			FSSH_B_GET_BIOS_GEOMETRY
431 #define B_GET_MEDIA_STATUS			FSSH_B_GET_MEDIA_STATUS
432 #define B_LOAD_MEDIA				FSSH_B_LOAD_MEDIA
433 #define B_GET_BIOS_DRIVE_ID			FSSH_B_GET_BIOS_DRIVE_ID
434 #define B_SET_UNINTERRUPTABLE_IO	FSSH_B_SET_UNINTERRUPTABLE_IO
435 #define B_SET_INTERRUPTABLE_IO		FSSH_B_SET_INTERRUPTABLE_IO
436 #define B_FLUSH_DRIVE_CACHE			FSSH_B_FLUSH_DRIVE_CACHE
437 #define B_GET_PATH_FOR_DEVICE		FSSH_B_GET_PATH_FOR_DEVICE
438 #define B_GET_NEXT_OPEN_DEVICE		FSSH_B_GET_NEXT_OPEN_DEVICE
439 #define B_ADD_FIXED_DRIVER			FSSH_B_ADD_FIXED_DRIVER
440 #define B_REMOVE_FIXED_DRIVER		FSSH_B_REMOVE_FIXED_DRIVER
441 #define B_AUDIO_DRIVER_BASE			FSSH_B_AUDIO_DRIVER_BASE
442 #define B_MIDI_DRIVER_BASE			FSSH_B_MIDI_DRIVER_BASE
443 #define B_JOYSTICK_DRIVER_BASE		FSSH_B_JOYSTICK_DRIVER_BASE
444 #define B_GRAPHIC_DRIVER_BASE		FSSH_B_GRAPHIC_DRIVER_BASE
445 #define B_DEVICE_OP_CODES_END		FSSH_B_DEVICE_OP_CODES_END
446 
447 #define device_geometry	fssh_device_geometry
448 
449 #define B_DISK		FSSH_B_DISK
450 #define B_TAPE		FSSH_B_TAPE
451 #define B_PRINTER	FSSH_B_PRINTER
452 #define B_CPU		FSSH_B_CPU
453 #define B_WORM		FSSH_B_WORM
454 #define B_CD		FSSH_B_CD
455 #define B_SCANNER	FSSH_B_SCANNER
456 #define B_OPTICAL	FSSH_B_OPTICAL
457 #define B_JUKEBOX	FSSH_B_JUKEBOX
458 #define B_NETWORK	FSSH_B_NETWORK
459 
460 
461 #define partition_info			fssh_partition_info
462 #define driver_path				fssh_driver_path
463 #define open_device_iterator	fssh_open_device_iterator
464 #define device_icon				fssh_device_icon
465 
466 
467 ////////////////////////////////////////////////////////////////////////////////
468 // #pragma mark - fssh_errors.h
469 
470 /* Error baselines */
471 #define B_GENERAL_ERROR_BASE		FSSH_B_GENERAL_ERROR_BASE
472 #define B_OS_ERROR_BASE				FSSH_B_OS_ERROR_BASE
473 #define B_APP_ERROR_BASE			FSSH_B_APP_ERROR_BASE
474 #define B_INTERFACE_ERROR_BASE		FSSH_B_INTERFACE_ERROR_BASE
475 #define B_MEDIA_ERROR_BASE			FSSH_B_MEDIA_ERROR_BASE
476 #define B_TRANSLATION_ERROR_BASE	FSSH_B_TRANSLATION_ERROR_BASE
477 #define B_MIDI_ERROR_BASE			FSSH_B_MIDI_ERROR_BASE
478 #define B_STORAGE_ERROR_BASE		FSSH_B_STORAGE_ERROR_BASE
479 #define B_POSIX_ERROR_BASE			FSSH_B_POSIX_ERROR_BASE
480 #define B_MAIL_ERROR_BASE			FSSH_B_MAIL_ERROR_BASE
481 #define B_PRINT_ERROR_BASE			FSSH_B_PRINT_ERROR_BASE
482 #define B_DEVICE_ERROR_BASE			FSSH_B_DEVICE_ERROR_BASE
483 
484 /* Developer-defined errors start at (B_ERRORS_END+1) */
485 #define B_ERRORS_END				FSSH_B_ERRORS_END
486 
487 /* General Errors */
488 #define B_NO_MEMORY			FSSH_B_NO_MEMORY
489 #define B_IO_ERROR			FSSH_B_IO_ERROR
490 #define B_PERMISSION_DENIED	FSSH_B_PERMISSION_DENIED
491 #define B_BAD_INDEX			FSSH_B_BAD_INDEX
492 #define B_BAD_TYPE			FSSH_B_BAD_TYPE
493 #define B_BAD_VALUE			FSSH_B_BAD_VALUE
494 #define B_MISMATCHED_VALUES	FSSH_B_MISMATCHED_VALUES
495 #define B_NAME_NOT_FOUND	FSSH_B_NAME_NOT_FOUND
496 #define B_NAME_IN_USE		FSSH_B_NAME_IN_USE
497 #define B_TIMED_OUT			FSSH_B_TIMED_OUT
498 #define B_INTERRUPTED		FSSH_B_INTERRUPTED
499 #define B_WOULD_BLOCK		FSSH_B_WOULD_BLOCK
500 #define B_CANCELED			FSSH_B_CANCELED
501 #define B_NO_INIT			FSSH_B_NO_INIT
502 #define B_BUSY				FSSH_B_BUSY
503 #define B_NOT_ALLOWED		FSSH_B_NOT_ALLOWED
504 #define B_BAD_DATA			FSSH_B_BAD_DATA
505 #define B_DONT_DO_THAT		FSSH_B_DONT_DO_THAT
506 
507 #define B_ERROR				FSSH_B_ERROR
508 #define B_OK				FSSH_B_OK
509 #define B_NO_ERROR			FSSH_B_NO_ERROR
510 
511 /* Kernel Kit Errors */
512 #define B_BAD_SEM_ID		FSSH_B_BAD_SEM_ID
513 #define B_NO_MORE_SEMS		FSSH_B_NO_MORE_SEMS
514 
515 #define B_BAD_THREAD_ID		FSSH_B_BAD_THREAD_ID
516 #define B_NO_MORE_THREADS	FSSH_B_NO_MORE_THREADS
517 #define B_BAD_THREAD_STATE	FSSH_B_BAD_THREAD_STATE
518 #define B_BAD_TEAM_ID		FSSH_B_BAD_TEAM_ID
519 #define B_NO_MORE_TEAMS		FSSH_B_NO_MORE_TEAMS
520 
521 #define B_BAD_PORT_ID		FSSH_B_BAD_PORT_ID
522 #define B_NO_MORE_PORTS		FSSH_B_NO_MORE_PORTS
523 
524 #define B_BAD_IMAGE_ID		FSSH_B_BAD_IMAGE_ID
525 #define B_BAD_ADDRESS		FSSH_B_BAD_ADDRESS
526 #define B_NOT_AN_EXECUTABLE	FSSH_B_NOT_AN_EXECUTABLE
527 #define B_MISSING_LIBRARY	FSSH_B_MISSING_LIBRARY
528 #define B_MISSING_SYMBOL	FSSH_B_MISSING_SYMBOL
529 
530 #define B_DEBUGGER_ALREADY_INSTALLED	FSSH_B_DEBUGGER_ALREADY_INSTALLED
531 
532 /* Application Kit Errors */
533 #define B_BAD_REPLY							FSSH_B_BAD_REPLY
534 #define B_DUPLICATE_REPLY					FSSH_B_DUPLICATE_REPLY
535 #define B_MESSAGE_TO_SELF					FSSH_B_MESSAGE_TO_SELF
536 #define B_BAD_HANDLER						FSSH_B_BAD_HANDLER
537 #define B_ALREADY_RUNNING					FSSH_B_ALREADY_RUNNING
538 #define B_LAUNCH_FAILED						FSSH_B_LAUNCH_FAILED
539 #define B_AMBIGUOUS_APP_LAUNCH				FSSH_B_AMBIGUOUS_APP_LAUNCH
540 #define B_UNKNOWN_MIME_TYPE					FSSH_B_UNKNOWN_MIME_TYPE
541 #define B_BAD_SCRIPT_SYNTAX					FSSH_B_BAD_SCRIPT_SYNTAX
542 #define B_LAUNCH_FAILED_NO_RESOLVE_LINK		FSSH_B_LAUNCH_FAILED_NO_RESOLVE_LINK
543 #define B_LAUNCH_FAILED_EXECUTABLE			FSSH_B_LAUNCH_FAILED_EXECUTABLE
544 #define B_LAUNCH_FAILED_APP_NOT_FOUND		FSSH_B_LAUNCH_FAILED_APP_NOT_FOUND
545 #define B_LAUNCH_FAILED_APP_IN_TRASH		FSSH_B_LAUNCH_FAILED_APP_IN_TRASH
546 #define B_LAUNCH_FAILED_NO_PREFERRED_APP	FSSH_B_LAUNCH_FAILED_NO_PREFERRED_APP
547 #define B_LAUNCH_FAILED_FILES_APP_NOT_FOUND	FSSH_B_LAUNCH_FAILED_FILES_APP_NOT_FOUND
548 #define B_BAD_MIME_SNIFFER_RULE				FSSH_B_BAD_MIME_SNIFFER_RULE
549 #define B_NOT_A_MESSAGE						FSSH_B_NOT_A_MESSAGE
550 #define B_SHUTDOWN_CANCELLED				FSSH_B_SHUTDOWN_CANCELLED
551 #define B_SHUTTING_DOWN						FSSH_B_SHUTTING_DOWN
552 
553 /* Storage Kit/File System Errors */
554 #define B_FILE_ERROR			FSSH_B_FILE_ERROR
555 #define B_FILE_NOT_FOUND		FSSH_B_FILE_NOT_FOUND
556 #define B_FILE_EXISTS			FSSH_B_FILE_EXISTS
557 #define B_ENTRY_NOT_FOUND		FSSH_B_ENTRY_NOT_FOUND
558 #define B_NAME_TOO_LONG			FSSH_B_NAME_TOO_LONG
559 #define B_NOT_A_DIRECTORY		FSSH_B_NOT_A_DIRECTORY
560 #define B_DIRECTORY_NOT_EMPTY	FSSH_B_DIRECTORY_NOT_EMPTY
561 #define B_DEVICE_FULL			FSSH_B_DEVICE_FULL
562 #define B_READ_ONLY_DEVICE		FSSH_B_READ_ONLY_DEVICE
563 #define B_IS_A_DIRECTORY		FSSH_B_IS_A_DIRECTORY
564 #define B_NO_MORE_FDS			FSSH_B_NO_MORE_FDS
565 #define B_CROSS_DEVICE_LINK		FSSH_B_CROSS_DEVICE_LINK
566 #define B_LINK_LIMIT			FSSH_B_LINK_LIMIT
567 #define B_BUSTED_PIPE			FSSH_B_BUSTED_PIPE
568 #define B_UNSUPPORTED			FSSH_B_UNSUPPORTED
569 #define B_PARTITION_TOO_SMALL	FSSH_B_PARTITION_TOO_SMALL
570 
571 /* POSIX Errors */
572 #define E2BIG			FSSH_E2BIG
573 #define ECHILD			FSSH_ECHILD
574 #define EDEADLK			FSSH_EDEADLK
575 #define EFBIG			FSSH_EFBIG
576 #define EMLINK			FSSH_EMLINK
577 #define ENFILE			FSSH_ENFILE
578 #define ENODEV			FSSH_ENODEV
579 #define ENOLCK			FSSH_ENOLCK
580 #define ENOSYS			FSSH_ENOSYS
581 #define ENOTTY			FSSH_ENOTTY
582 #define ENXIO			FSSH_ENXIO
583 #define ESPIPE			FSSH_ESPIPE
584 #define ESRCH			FSSH_ESRCH
585 #define EFPOS			FSSH_EFPOS
586 #define ESIGPARM		FSSH_ESIGPARM
587 #define EDOM			FSSH_EDOM
588 #define ERANGE			FSSH_ERANGE
589 #define EPROTOTYPE		FSSH_EPROTOTYPE
590 #define EPROTONOSUPPORT	FSSH_EPROTONOSUPPORT
591 #define EPFNOSUPPORT	FSSH_EPFNOSUPPORT
592 #define EAFNOSUPPORT	FSSH_EAFNOSUPPORT
593 #define EADDRINUSE		FSSH_EADDRINUSE
594 #define EADDRNOTAVAIL	FSSH_EADDRNOTAVAIL
595 #define ENETDOWN		FSSH_ENETDOWN
596 #define ENETUNREACH		FSSH_ENETUNREACH
597 #define ENETRESET		FSSH_ENETRESET
598 #define ECONNABORTED	FSSH_ECONNABORTED
599 #define ECONNRESET		FSSH_ECONNRESET
600 #define EISCONN			FSSH_EISCONN
601 #define ENOTCONN		FSSH_ENOTCONN
602 #define ESHUTDOWN		FSSH_ESHUTDOWN
603 #define ECONNREFUSED	FSSH_ECONNREFUSED
604 #define EHOSTUNREACH	FSSH_EHOSTUNREACH
605 #define ENOPROTOOPT		FSSH_ENOPROTOOPT
606 #define ENOBUFS			FSSH_ENOBUFS
607 #define EINPROGRESS		FSSH_EINPROGRESS
608 #define EALREADY		FSSH_EALREADY
609 #define EILSEQ			FSSH_EILSEQ
610 #define ENOMSG			FSSH_ENOMSG
611 #define ESTALE			FSSH_ESTALE
612 #define EOVERFLOW		FSSH_EOVERFLOW
613 #define EMSGSIZE		FSSH_EMSGSIZE
614 #define EOPNOTSUPP		FSSH_EOPNOTSUPP
615 #define ENOTSOCK		FSSH_ENOTSOCK
616 #define EHOSTDOWN		FSSH_EHOSTDOWN
617 #define EBADMSG			FSSH_EBADMSG
618 #define ECANCELED		FSSH_ECANCELED
619 #define EDESTADDRREQ	FSSH_EDESTADDRREQ
620 #define EDQUOT			FSSH_EDQUOT
621 #define EIDRM			FSSH_EIDRM
622 #define EMULTIHOP		FSSH_EMULTIHOP
623 #define ENODATA			FSSH_ENODATA
624 #define ENOLINK			FSSH_ENOLINK
625 #define ENOSR			FSSH_ENOSR
626 #define ENOSTR			FSSH_ENOSTR
627 #define ENOTSUP			FSSH_ENOTSUP
628 #define EPROTO			FSSH_EPROTO
629 #define ETIME			FSSH_ETIME
630 #define ETXTBSY			FSSH_ETXTBSY
631 
632 /* POSIX errors that can be mapped to BeOS error codes */
633 #define ENOMEM			FSSH_ENOMEM
634 #define EACCES			FSSH_EACCES
635 #define EINTR			FSSH_EINTR
636 #define EIO				FSSH_EIO
637 #define EBUSY			FSSH_EBUSY
638 #define EFAULT			FSSH_EFAULT
639 #define ETIMEDOUT		FSSH_ETIMEDOUT
640 #define EAGAIN			FSSH_EAGAIN
641 #define EWOULDBLOCK		FSSH_EWOULDBLOCK
642 #define EBADF			FSSH_EBADF
643 #define EEXIST			FSSH_EEXIST
644 #define EINVAL			FSSH_EINVAL
645 #define ENAMETOOLONG	FSSH_ENAMETOOLONG
646 #define ENOENT			FSSH_ENOENT
647 #define EPERM			FSSH_EPERM
648 #define ENOTDIR			FSSH_ENOTDIR
649 #define EISDIR			FSSH_EISDIR
650 #define ENOTEMPTY		FSSH_ENOTEMPTY
651 #define ENOSPC			FSSH_ENOSPC
652 #define EROFS			FSSH_EROFS
653 #define EMFILE			FSSH_EMFILE
654 #define EXDEV			FSSH_EXDEV
655 #define ELOOP			FSSH_ELOOP
656 #define ENOEXEC			FSSH_ENOEXEC
657 #define EPIPE			FSSH_EPIPE
658 
659 /* new error codes that can be mapped to POSIX errors */
660 #define B_BUFFER_OVERFLOW			FSSH_B_BUFFER_OVERFLOW
661 #define B_TOO_MANY_ARGS				FSSH_B_TOO_MANY_ARGS
662 #define	B_FILE_TOO_LARGE			FSSH_B_FILE_TOO_LARGE
663 #define B_RESULT_NOT_REPRESENTABLE	FSSH_B_RESULT_NOT_REPRESENTABLE
664 #define	B_DEVICE_NOT_FOUND			FSSH_B_DEVICE_NOT_FOUND
665 #define B_NOT_SUPPORTED				FSSH_B_NOT_SUPPORTED
666 
667 /* Media Kit Errors */
668 #define B_STREAM_NOT_FOUND			FSSH_B_STREAM_NOT_FOUND
669 #define B_SERVER_NOT_FOUND			FSSH_B_SERVER_NOT_FOUND
670 #define B_RESOURCE_NOT_FOUND		FSSH_B_RESOURCE_NOT_FOUND
671 #define B_RESOURCE_UNAVAILABLE		FSSH_B_RESOURCE_UNAVAILABLE
672 #define B_BAD_SUBSCRIBER			FSSH_B_BAD_SUBSCRIBER
673 #define B_SUBSCRIBER_NOT_ENTERED	FSSH_B_SUBSCRIBER_NOT_ENTERED
674 #define B_BUFFER_NOT_AVAILABLE		FSSH_B_BUFFER_NOT_AVAILABLE
675 #define B_LAST_BUFFER_ERROR			FSSH_B_LAST_BUFFER_ERROR
676 
677 /* Mail Kit Errors */
678 #define B_MAIL_NO_DAEMON		FSSH_B_MAIL_NO_DAEMON
679 #define B_MAIL_UNKNOWN_USER		FSSH_B_MAIL_UNKNOWN_USER
680 #define B_MAIL_WRONG_PASSWORD	FSSH_B_MAIL_WRONG_PASSWORD
681 #define B_MAIL_UNKNOWN_HOST		FSSH_B_MAIL_UNKNOWN_HOST
682 #define B_MAIL_ACCESS_ERROR		FSSH_B_MAIL_ACCESS_ERROR
683 #define B_MAIL_UNKNOWN_FIELD	FSSH_B_MAIL_UNKNOWN_FIELD
684 #define B_MAIL_NO_RECIPIENT		FSSH_B_MAIL_NO_RECIPIENT
685 #define B_MAIL_INVALID_MAIL		FSSH_B_MAIL_INVALID_MAIL
686 
687 /* Printing Errors */
688 #define B_NO_PRINT_SERVER		FSSH_B_NO_PRINT_SERVER
689 
690 /* Device Kit Errors */
691 #define B_DEV_INVALID_IOCTL				FSSH_B_DEV_INVALID_IOCTL
692 #define B_DEV_NO_MEMORY					FSSH_B_DEV_NO_MEMORY
693 #define B_DEV_BAD_DRIVE_NUM				FSSH_B_DEV_BAD_DRIVE_NUM
694 #define B_DEV_NO_MEDIA					FSSH_B_DEV_NO_MEDIA
695 #define B_DEV_UNREADABLE				FSSH_B_DEV_UNREADABLE
696 #define B_DEV_FORMAT_ERROR				FSSH_B_DEV_FORMAT_ERROR
697 #define B_DEV_TIMEOUT					FSSH_B_DEV_TIMEOUT
698 #define B_DEV_RECALIBRATE_ERROR			FSSH_B_DEV_RECALIBRATE_ERROR
699 #define B_DEV_SEEK_ERROR				FSSH_B_DEV_SEEK_ERROR
700 #define B_DEV_ID_ERROR					FSSH_B_DEV_ID_ERROR
701 #define B_DEV_READ_ERROR				FSSH_B_DEV_READ_ERROR
702 #define B_DEV_WRITE_ERROR				FSSH_B_DEV_WRITE_ERROR
703 #define B_DEV_NOT_READY					FSSH_B_DEV_NOT_READY
704 #define B_DEV_MEDIA_CHANGED				FSSH_B_DEV_MEDIA_CHANGED
705 #define B_DEV_MEDIA_CHANGE_REQUESTED	FSSH_B_DEV_MEDIA_CHANGE_REQUESTED
706 #define B_DEV_RESOURCE_CONFLICT			FSSH_B_DEV_RESOURCE_CONFLICT
707 #define B_DEV_CONFIGURATION_ERROR		FSSH_B_DEV_CONFIGURATION_ERROR
708 #define B_DEV_DISABLED_BY_USER			FSSH_B_DEV_DISABLED_BY_USER
709 #define B_DEV_DOOR_OPEN					FSSH_B_DEV_DOOR_OPEN
710 
711 #define B_DEV_INVALID_PIPE				FSSH_B_DEV_INVALID_PIPE
712 #define B_DEV_CRC_ERROR					FSSH_B_DEV_CRC_ERROR
713 #define B_DEV_STALLED					FSSH_B_DEV_STALLED
714 #define B_DEV_BAD_PID					FSSH_B_DEV_BAD_PID
715 #define B_DEV_UNEXPECTED_PID			FSSH_B_DEV_UNEXPECTED_PID
716 #define B_DEV_DATA_OVERRUN				FSSH_B_DEV_DATA_OVERRUN
717 #define B_DEV_DATA_UNDERRUN				FSSH_B_DEV_DATA_UNDERRUN
718 #define B_DEV_FIFO_OVERRUN				FSSH_B_DEV_FIFO_OVERRUN
719 #define B_DEV_FIFO_UNDERRUN				FSSH_B_DEV_FIFO_UNDERRUN
720 #define B_DEV_PENDING					FSSH_B_DEV_PENDING
721 #define B_DEV_MULTIPLE_ERRORS			FSSH_B_DEV_MULTIPLE_ERRORS
722 #define B_DEV_TOO_LATE					FSSH_B_DEV_TOO_LATE
723 
724 
725 ////////////////////////////////////////////////////////////////////////////////
726 // #pragma mark - fssh_errno.h
727 
728 #define ENOERR	FSSH_ENOERR
729 #define EOK		FSSH_EOK
730 
731 #define errno	fssh_errno
732 
733 
734 ////////////////////////////////////////////////////////////////////////////////
735 // #pragma mark - fssh_fcntl.h
736 
737 /* commands that can be passed to fcntl() */
738 #define F_DUPFD		FSSH_F_DUPFD
739 #define F_GETFD		FSSH_F_GETFD
740 #define F_SETFD		FSSH_F_SETFD
741 #define F_GETFL		FSSH_F_GETFL
742 #define F_SETFL		FSSH_F_SETFL
743 #define F_GETLK		FSSH_F_GETLK
744 #define F_SETLK		FSSH_F_SETLK
745 #define F_SETLKW	FSSH_F_SETLKW
746 
747 /* advisory locking types */
748 #define F_RDLCK	FSSH_F_RDLCK
749 #define F_UNLCK	FSSH_F_UNLCK
750 #define F_WRLCK	FSSH_F_WRLCK
751 
752 /* file descriptor flags for fcntl() */
753 #define FD_CLOEXEC	FSSH_FD_CLOEXEC
754 
755 /* file access modes for open() */
756 #define O_RDONLY	FSSH_O_RDONLY
757 #define O_WRONLY	FSSH_O_WRONLY
758 #define O_RDWR		FSSH_O_RDWR
759 #define O_ACCMODE	FSSH_O_ACCMODE
760 #define O_RWMASK	FSSH_O_RWMASK
761 
762 /* flags for open() */
763 #define O_EXCL			FSSH_O_EXCL
764 #define O_CREAT			FSSH_O_CREAT
765 #define O_TRUNC			FSSH_O_TRUNC
766 #define O_NOCTTY		FSSH_O_NOCTTY
767 #define O_NOTRAVERSE	FSSH_O_NOTRAVERSE
768 
769 /* flags for open() and fcntl() */
770 #define O_CLOEXEC	FSSH_O_CLOEXEC
771 #define O_NONBLOCK	FSSH_O_NONBLOCK
772 #define O_APPEND	FSSH_O_APPEND
773 #define O_TEXT		FSSH_O_TEXT
774 #define O_BINARY	FSSH_O_BINARY
775 #define O_SYNC		FSSH_O_SYNC
776 #define O_RSYNC		FSSH_O_RSYNC
777 #define O_DSYNC		FSSH_O_DSYNC
778 
779 #define O_NOFOLLOW	FSSH_O_NOFOLLOW
780 #define O_NOCACHE	FSSH_O_NOCACHE
781 #define O_DIRECT	FSSH_O_DIRECT
782 #define O_DIRECTORY	FSSH_O_DIRECTORY
783 #define O_TEMPORARY	FSSH_O_TEMPORARY
784 
785 #define S_IREAD		FSSH_S_IREAD
786 #define S_IWRITE	FSSH_S_IWRITE
787 
788 #define creat	fssh_creat
789 #define open	fssh_open
790 #define fcntl	fssh_fcntl
791 
792 
793 ////////////////////////////////////////////////////////////////////////////////
794 // #pragma mark - fssh_fs_attr.h
795 
796 #define attr_info	fssh_attr_info
797 
798 
799 ////////////////////////////////////////////////////////////////////////////////
800 // #pragma mark - fssh_fs_cache.h
801 
802 #define TRANSACTION_WRITTEN				FSSH_TRANSACTION_WRITTEN
803 #define TRANSACTION_ABORTED				FSSH_TRANSACTION_ABORTED
804 #define TRANSACTION_ENDED				FSSH_TRANSACTION_ENDED
805 #define TRANSACTION_IDLE				FSSH_TRANSACTION_IDLE
806 
807 #define FILE_MAP_CACHE_ON_DEMAND		FSSH_FILE_MAP_CACHE_ON_DEMAND
808 #define FILE_MAP_CACHE_ALL				FSSH_FILE_MAP_CACHE_ALL
809 
810 #define transaction_notification_hook	fssh_transaction_notification_hook
811 
812 /* transactions */
813 #define cache_start_transaction			fssh_cache_start_transaction
814 #define cache_sync_transaction			fssh_cache_sync_transaction
815 #define cache_end_transaction			fssh_cache_end_transaction
816 #define cache_abort_transaction			fssh_cache_abort_transaction
817 #define cache_detach_sub_transaction	fssh_cache_detach_sub_transaction
818 #define cache_abort_sub_transaction		fssh_cache_abort_sub_transaction
819 #define cache_start_sub_transaction		fssh_cache_start_sub_transaction
820 #define cache_add_transaction_listener	fssh_cache_add_transaction_listener
821 #define cache_remove_transaction_listener fssh_cache_remove_transaction_listener
822 #define cache_next_block_in_transaction	fssh_cache_next_block_in_transaction
823 #define cache_blocks_in_transaction		fssh_cache_blocks_in_transaction
824 #define cache_blocks_in_main_transaction fssh_cache_blocks_in_main_transaction
825 #define cache_blocks_in_sub_transaction	fssh_cache_blocks_in_sub_transaction
826 
827 /* block cache */
828 #define block_cache_delete				fssh_block_cache_delete
829 #define block_cache_create				fssh_block_cache_create
830 #define block_cache_sync				fssh_block_cache_sync
831 #define block_cache_sync_etc			fssh_block_cache_sync_etc
832 #define block_cache_discard				fssh_block_cache_discard
833 #define block_cache_make_writable		fssh_block_cache_make_writable
834 #define block_cache_get_writable_etc	fssh_block_cache_get_writable_etc
835 #define block_cache_get_writable		fssh_block_cache_get_writable
836 #define block_cache_get_empty			fssh_block_cache_get_empty
837 #define block_cache_get_etc				fssh_block_cache_get_etc
838 #define block_cache_get					fssh_block_cache_get
839 #define block_cache_set_dirty			fssh_block_cache_set_dirty
840 #define block_cache_put					fssh_block_cache_put
841 
842 /* file cache */
843 #define file_cache_create				fssh_file_cache_create
844 #define file_cache_delete				fssh_file_cache_delete
845 #define file_cache_enable				fssh_file_cache_enable
846 #define file_cache_disable				fssh_file_cache_disable
847 #define file_cache_set_size				fssh_file_cache_set_size
848 #define file_cache_sync					fssh_file_cache_sync
849 
850 #define file_cache_read					fssh_file_cache_read
851 #define file_cache_write				fssh_file_cache_write
852 
853 /* file map */
854 #define file_map_create					fssh_file_map_create
855 #define file_map_delete					fssh_file_map_delete
856 #define file_map_set_size				fssh_file_map_set_size
857 #define file_map_invalidate				fssh_file_map_invalidate
858 #define file_map_translate				fssh_file_map_translate
859 
860 /* entry cache */
861 #define entry_cache_add					fssh_entry_cache_add
862 #define entry_cache_remove				fssh_entry_cache_remove
863 
864 ////////////////////////////////////////////////////////////////////////////////
865 // #pragma mark - fssh_fs_index.h
866 
867 #define index_info	fssh_index_info
868 
869 
870 ////////////////////////////////////////////////////////////////////////////////
871 // #pragma mark - fssh_fs_info.h
872 
873 /* fs_info.flags */
874 #define	B_FS_IS_READONLY				FSSH_B_FS_IS_READONLY
875 #define	B_FS_IS_REMOVABLE				FSSH_B_FS_IS_REMOVABLE
876 #define	B_FS_IS_PERSISTENT				FSSH_B_FS_IS_PERSISTENT
877 #define	B_FS_IS_SHARED					FSSH_B_FS_IS_SHARED
878 #define	B_FS_HAS_MIME					FSSH_B_FS_HAS_MIME
879 #define	B_FS_HAS_ATTR					FSSH_B_FS_HAS_ATTR
880 #define	B_FS_HAS_QUERY					FSSH_B_FS_HAS_QUERY
881 // those additions are preliminary and may be removed
882 #define B_FS_HAS_SELF_HEALING_LINKS		FSSH_B_FS_HAS_SELF_HEALING_LINKS
883 #define B_FS_HAS_ALIASES				FSSH_B_FS_HAS_ALIASES
884 #define B_FS_SUPPORTS_NODE_MONITORING	FSSH_B_FS_SUPPORTS_NODE_MONITORING
885 
886 #define fs_info	fssh_fs_info
887 
888 
889 ////////////////////////////////////////////////////////////////////////////////
890 // #pragma mark - fssh_fs_interface.h
891 
892 #define mount_id	fssh_mount_id
893 #define vnode_id	fssh_vnode_id
894 
895 // TODO: These two don't belong here!
896 #define IORequest	FSSHIORequest
897 #define io_request	fssh_io_request
898 
899 /* additional flags passed to write_stat() */
900 #define B_STAT_SIZE_INSECURE	FSSH_B_STAT_SIZE_INSECURE
901 
902 /* passed to write_fs_info() */
903 #define FS_WRITE_FSINFO_NAME	FSSH_FS_WRITE_FSINFO_NAME
904 
905 #define file_io_vec	fssh_file_io_vec
906 
907 #define B_CURRENT_FS_API_VERSION	FSSH_B_CURRENT_FS_API_VERSION
908 
909 // flags for publish_vnode() and fs_volume_ops::get_vnode()
910 #define B_VNODE_PUBLISH_REMOVED					FSSH_B_VNODE_PUBLISH_REMOVED
911 #define B_VNODE_DONT_CREATE_SPECIAL_SUB_NODE	FSSH_B_VNODE_DONT_CREATE_SPECIAL_SUB_NODE
912 
913 #define fs_volume				fssh_fs_volume
914 #define fs_volume_ops			fssh_fs_volume_ops
915 #define fs_vnode				fssh_fs_vnode
916 #define fs_vnode_ops			fssh_fs_vnode_ops
917 #define file_system_module_info	fssh_file_system_module_info
918 
919 
920 /* file system add-ons only prototypes */
921 #define iterative_io_get_vecs		fssh_iterative_io_get_vecs
922 #define iterative_io_finished		fssh_iterative_io_finished
923 
924 #define new_vnode 					fssh_new_vnode
925 #define publish_vnode				fssh_publish_vnode
926 #define get_vnode					fssh_get_vnode
927 #define put_vnode					fssh_put_vnode
928 #define acquire_vnode				fssh_acquire_vnode
929 #define remove_vnode				fssh_remove_vnode
930 #define unremove_vnode				fssh_unremove_vnode
931 #define get_vnode_removed			fssh_get_vnode_removed
932 #define volume_for_vnode			fssh_volume_for_vnode
933 #define read_pages					fssh_read_pages
934 #define write_pages					fssh_write_pages
935 #define read_file_io_vec_pages		fssh_read_file_io_vec_pages
936 #define write_file_io_vec_pages		fssh_write_file_io_vec_pages
937 #define do_fd_io					fssh_do_fd_io
938 #define do_iterative_fd_io			fssh_do_iterative_fd_io
939 
940 #define notify_entry_created		fssh_notify_entry_created
941 #define notify_entry_removed		fssh_notify_entry_removed
942 #define notify_entry_moved			fssh_notify_entry_moved
943 #define notify_stat_changed			fssh_notify_stat_changed
944 #define notify_attribute_changed	fssh_notify_attribute_changed
945 
946 #define notify_query_entry_created	fssh_notify_query_entry_created
947 #define notify_query_entry_removed	fssh_notify_query_entry_removed
948 
949 
950 ////////////////////////////////////////////////////////////////////////////////
951 // #pragma mark - fssh_fs_query.h
952 
953 #define B_LIVE_QUERY		FSSH_B_LIVE_QUERY
954 #define B_QUERY_NON_INDEXED	FSSH_B_QUERY_NON_INDEXED
955 
956 
957 ////////////////////////////////////////////////////////////////////////////////
958 // #pragma mark - fssh_fs_volume.h
959 
960 #define B_MOUNT_READ_ONLY		FSSH_B_MOUNT_READ_ONLY
961 #define B_MOUNT_VIRTUAL_DEVICE	FSSH_B_MOUNT_VIRTUAL_DEVICE
962 
963 /* unmount flags */
964 #define B_FORCE_UNMOUNT			FSSH_B_FORCE_UNMOUNT
965 
966 
967 ////////////////////////////////////////////////////////////////////////////////
968 // #pragma mark - fssh_kernel_export.h
969 
970 /* kernel threads */
971 #define spawn_kernel_thread	fssh_spawn_kernel_thread
972 
973 /* misc */
974 #define user_memcpy			fssh_user_memcpy
975 
976 /* primitive kernel debugging facilities */
977 #define dprintf				fssh_dprintf
978 #define kprintf				fssh_kprintf
979 #define dump_block			fssh_dump_block
980 #define panic				fssh_panic
981 #define kernel_debugger		fssh_kernel_debugger
982 #define parse_expression	fssh_parse_expression
983 
984 #define debugger_command_hook	fssh_debugger_command_hook
985 #define add_debugger_command	fssh_add_debugger_command
986 #define remove_debugger_command	fssh_remove_debugger_command
987 
988 
989 ////////////////////////////////////////////////////////////////////////////////
990 // #pragma mark - fssh_lock.h
991 
992 #define mutex						fssh_mutex
993 #define rw_lock						fssh_rw_lock
994 #define recursive_lock				fssh_recursive_lock
995 
996 #define MUTEX_FLAG_CLONE_NAME		FSSH_MUTEX_FLAG_CLONE_NAME
997 #define RW_LOCK_FLAG_CLONE_NAME		FSSH_RW_LOCK_FLAG_CLONE_NAME
998 
999 #define ASSERT_LOCKED_RECURSIVE(r)	FSSH_ASSERT_LOCKED_RECURSIVE(r)
1000 #define ASSERT_LOCKED_MUTEX(m)		FSSH_ASSERT_LOCKED_MUTEX(m)
1001 #define ASSERT_WRITE_LOCKED_RW_LOCK(l) FSSH_ASSERT_WRITE_LOCKED_RW_LOCK(l)
1002 #define ASSERT_READ_LOCKED_RW_LOCK(l) FSSH_ASSERT_READ_LOCKED_RW_LOCK(l)
1003 
1004 #define MUTEX_INITIALIZER(name)		FSSH_MUTEX_INITIALIZER(name)
1005 #define RECURSIVE_LOCK_INITIALIZER(name) FSSH_RECURSIVE_LOCK_INITIALIZER(name)
1006 #define RW_LOCK_INITIALIZER(name)	FSSH_RW_LOCK_INITIALIZER(name)
1007 
1008 #define	recursive_lock_init			fssh_recursive_lock_init
1009 #define recursive_lock_init_etc		fssh_recursive_lock_init_etc
1010 #define recursive_lock_destroy		fssh_recursive_lock_destroy
1011 #define recursive_lock_lock			fssh_recursive_lock_lock
1012 #define recursive_lock_trylock		fssh_recursive_lock_trylock
1013 #define recursive_lock_unlock		fssh_recursive_lock_unlock
1014 #define recursive_lock_get_recursion fssh_recursive_lock_get_recursion
1015 
1016 #define rw_lock_init				fssh_rw_lock_init
1017 #define rw_lock_init_etc			fssh_rw_lock_init_etc
1018 #define rw_lock_destroy				fssh_rw_lock_destroy
1019 #define rw_lock_read_lock			fssh_rw_lock_read_lock
1020 #define rw_lock_read_unlock			fssh_rw_lock_read_unlock
1021 #define rw_lock_write_lock			fssh_rw_lock_write_lock
1022 #define rw_lock_write_unlock		fssh_rw_lock_write_unlock
1023 
1024 #define mutex_init					fssh_mutex_init
1025 #define mutex_init_etc				fssh_mutex_init_etc
1026 #define mutex_destroy				fssh_mutex_destroy
1027 #define mutex_lock					fssh_mutex_lock
1028 #define mutex_trylock				fssh_mutex_trylock
1029 #define mutex_unlock				fssh_mutex_unlock
1030 #define mutex_transfer_lock			fssh_mutex_transfer_lock
1031 
1032 
1033 ////////////////////////////////////////////////////////////////////////////////
1034 // #pragma mark - fssh_module.h
1035 
1036 #define module_info	fssh_module_info
1037 
1038 /* module standard operations */
1039 #define B_MODULE_INIT	FSSH_B_MODULE_INIT
1040 #define B_MODULE_UNINIT	FSSH_B_MODULE_UNINIT
1041 
1042 /* module flags */
1043 #define B_KEEP_LOADED	FSSH_B_KEEP_LOADED
1044 
1045 
1046 #define module_dependency	fssh_module_dependency
1047 
1048 
1049 ////////////////////////////////////////////////////////////////////////////////
1050 // #pragma mark - fssh_node_monitor.h
1051 
1052 #define B_STOP_WATCHING			FSSH_B_STOP_WATCHING
1053 #define B_WATCH_NAME			FSSH_B_WATCH_NAME
1054 #define B_WATCH_STAT			FSSH_B_WATCH_STAT
1055 #define B_WATCH_ATTR			FSSH_B_WATCH_ATTR
1056 #define B_WATCH_DIRECTORY		FSSH_B_WATCH_DIRECTORY
1057 #define B_WATCH_ALL				FSSH_B_WATCH_ALL
1058 #define B_WATCH_MOUNT			FSSH_B_WATCH_MOUNT
1059 #define B_WATCH_INTERIM_STAT	FSSH_B_WATCH_INTERIM_STAT
1060 
1061 #define B_ENTRY_CREATED		FSSH_B_ENTRY_CREATED
1062 #define B_ENTRY_REMOVED		FSSH_B_ENTRY_REMOVED
1063 #define B_ENTRY_MOVED		FSSH_B_ENTRY_MOVED
1064 #define B_STAT_CHANGED		FSSH_B_STAT_CHANGED
1065 #define B_ATTR_CHANGED		FSSH_B_ATTR_CHANGED
1066 #define B_DEVICE_MOUNTED	FSSH_B_DEVICE_MOUNTED
1067 #define B_DEVICE_UNMOUNTED	FSSH_B_DEVICE_UNMOUNTED
1068 
1069 #define B_ATTR_CREATED		FSSH_B_ATTR_CREATED
1070 #define B_ATTR_REMOVED		FSSH_B_ATTR_REMOVED
1071 
1072 #define B_STAT_MODE					FSSH_B_STAT_MODE
1073 #define B_STAT_UID					FSSH_B_STAT_UID
1074 #define B_STAT_GID					FSSH_B_STAT_GID
1075 #define B_STAT_SIZE					FSSH_B_STAT_SIZE
1076 #define B_STAT_ACCESS_TIME			FSSH_B_STAT_ACCESS_TIME
1077 #define B_STAT_MODIFICATION_TIME	FSSH_B_STAT_MODIFICATION_TIME
1078 #define B_STAT_CREATION_TIME		FSSH_B_STAT_CREATION_TIME
1079 #define B_STAT_CHANGE_TIME			FSSH_B_STAT_CHANGE_TIME
1080 #define B_STAT_INTERIM_UPDATE		FSSH_B_STAT_INTERIM_UPDATE
1081 
1082 
1083 ////////////////////////////////////////////////////////////////////////////////
1084 // #pragma mark - fssh_os.h
1085 
1086 /* System constants */
1087 
1088 #define B_OS_NAME_LENGTH	FSSH_B_OS_NAME_LENGTH
1089 #define B_PAGE_SIZE			FSSH_B_PAGE_SIZE
1090 #define B_INFINITE_TIMEOUT	FSSH_B_INFINITE_TIMEOUT
1091 
1092 
1093 /* Types */
1094 
1095 #define area_id		fssh_area_id
1096 #define port_id		fssh_port_id
1097 #define sem_id		fssh_sem_id
1098 #define team_id		fssh_team_id
1099 #define thread_id	fssh_thread_id
1100 
1101 
1102 /* Semaphores */
1103 
1104 #define sem_info	fssh_sem_info
1105 
1106 /* semaphore flags */
1107 #define B_CAN_INTERRUPT			FSSH_B_CAN_INTERRUPT
1108 #define B_CHECK_PERMISSION		FSSH_B_CHECK_PERMISSION
1109 #define B_KILL_CAN_INTERRUPT	FSSH_B_KILL_CAN_INTERRUPT
1110 
1111 #define B_DO_NOT_RESCHEDULE			FSSH_B_DO_NOT_RESCHEDULE
1112 #define B_RELEASE_ALL				FSSH_B_RELEASE_ALL
1113 #define B_RELEASE_IF_WAITING_ONLY	FSSH_B_RELEASE_IF_WAITING_ONLY
1114 
1115 #define create_sem		fssh_create_sem
1116 #define delete_sem		fssh_delete_sem
1117 #define acquire_sem		fssh_acquire_sem
1118 #define acquire_sem_etc	fssh_acquire_sem_etc
1119 #define release_sem		fssh_release_sem
1120 #define release_sem_etc	fssh_release_sem_etc
1121 #define get_sem_count	fssh_get_sem_count
1122 #define set_sem_owner	fssh_set_sem_owner
1123 
1124 #define get_sem_info(sem, info)					fssh_get_sem_info(sem, info)
1125 #define get_next_sem_info(team, cookie, info)	fssh_get_next_sem_info(team, cookie, info)
1126 
1127 #define B_TIMEOUT			FSSH_B_TIMEOUT
1128 #define B_RELATIVE_TIMEOUT	FSSH_B_RELATIVE_TIMEOUT
1129 #define B_ABSOLUTE_TIMEOUT	FSSH_B_ABSOLUTE_TIMEOUT
1130 
1131 
1132 /* Teams */
1133 
1134 #define B_CURRENT_TEAM	FSSH_B_CURRENT_TEAM
1135 #define B_SYSTEM_TEAM	FSSH_B_SYSTEM_TEAM
1136 
1137 
1138 /* Threads */
1139 
1140 #define B_THREAD_RUNNING	FSSH_B_THREAD_RUNNING
1141 #define B_THREAD_READY		FSSH_B_THREAD_READY
1142 #define B_THREAD_RECEIVING	FSSH_B_THREAD_RECEIVING
1143 #define B_THREAD_ASLEEP		FSSH_B_THREAD_ASLEEP
1144 #define B_THREAD_SUSPENDED	FSSH_B_THREAD_SUSPENDED
1145 #define B_THREAD_WAITING	FSSH_B_THREAD_WAITING
1146 
1147 #define thread_state		fssh_thread_state
1148 #define thread_info			fssh_thread_info
1149 
1150 #define B_IDLE_PRIORITY					FSSH_B_IDLE_PRIORITY
1151 #define B_LOWEST_ACTIVE_PRIORITY		FSSH_B_LOWEST_ACTIVE_PRIORITY
1152 #define B_LOW_PRIORITY					FSSH_B_LOW_PRIORITY
1153 #define B_NORMAL_PRIORITY				FSSH_B_NORMAL_PRIORITY
1154 #define B_DISPLAY_PRIORITY				FSSH_B_DISPLAY_PRIORITY
1155 #define B_URGENT_DISPLAY_PRIORITY		FSSH_B_URGENT_DISPLAY_PRIORITY
1156 #define B_REAL_TIME_DISPLAY_PRIORITY	FSSH_B_REAL_TIME_DISPLAY_PRIORITY
1157 #define B_URGENT_PRIORITY				FSSH_B_URGENT_PRIORITY
1158 #define B_REAL_TIME_PRIORITY			FSSH_B_REAL_TIME_PRIORITY
1159 
1160 #define B_FIRST_REAL_TIME_PRIORITY		FSSH_B_FIRST_REAL_TIME_PRIORITY
1161 #define B_MIN_PRIORITY					FSSH_B_MIN_PRIORITY
1162 #define B_MAX_PRIORITY					FSSH_B_MAX_PRIORITY
1163 
1164 #define B_SYSTEM_TIMEBASE				FSSH_B_SYSTEM_TIMEBASE
1165 
1166 #define thread_func			fssh_thread_func
1167 #define thread_entry		fssh_thread_entry
1168 
1169 #define spawn_thread		fssh_spawn_thread
1170 #define kill_thread			fssh_kill_thread
1171 #define resume_thread		fssh_resume_thread
1172 #define suspend_thread		fssh_suspend_thread
1173 
1174 #define rename_thread		fssh_rename_thread
1175 #define set_thread_priority	fssh_set_thread_priority
1176 #define exit_thread			fssh_exit_thread
1177 #define wait_for_thread 	fssh_wait_for_thread
1178 #define on_exit_thread		fssh_on_exit_thread
1179 
1180 #define find_thread			fssh_find_thread
1181 
1182 #define send_data			fssh_send_data
1183 #define receive_data		fssh_receive_data
1184 #define has_data			fssh_has_data
1185 
1186 #define snooze				fssh_snooze
1187 #define snooze_etc			fssh_snooze_etc
1188 #define snooze_until		fssh_snooze_until
1189 
1190 #define get_thread_info(id, info)					fssh_get_thread_info(id, info)
1191 #define get_next_thread_info(team, cookie, info)	fssh_get_next_thread_info(team, cookie, info)
1192 
1193 
1194 /* Time */
1195 
1196 #define real_time_clock			fssh_real_time_clock
1197 #define set_real_time_clock		fssh_set_real_time_clock
1198 #define real_time_clock_usecs	fssh_real_time_clock_usecs
1199 #define set_timezone			fssh_set_timezone
1200 #define system_time				fssh_system_time
1201 
1202 
1203 ////////////////////////////////////////////////////////////////////////////////
1204 // #pragma mark - fssh_stat.h
1205 
1206 #define stat	fssh_stat
1207 
1208 // struct stat fields
1209 #undef st_dev
1210 #undef st_ino
1211 #undef st_mode
1212 #undef st_nlink
1213 #undef st_uid
1214 #undef st_gid
1215 #undef st_size
1216 #undef st_rdev
1217 #undef st_blksize
1218 #undef st_atime
1219 #undef st_mtime
1220 #undef st_ctime
1221 #undef st_crtime
1222 #undef st_type
1223 
1224 #define st_dev		fssh_st_dev
1225 #define st_ino		fssh_st_ino
1226 #define st_mode		fssh_st_mode
1227 #define st_nlink	fssh_st_nlink
1228 #define st_uid		fssh_st_uid
1229 #define st_gid		fssh_st_gid
1230 #define st_size		fssh_st_size
1231 #define st_rdev		fssh_st_rdev
1232 #define st_blksize	fssh_st_blksize
1233 #define st_atim		fssh_st_atim
1234 #define st_mtim		fssh_st_mtim
1235 #define st_ctim		fssh_st_ctim
1236 #define st_crtim	fssh_st_crtim
1237 #define st_atime	fssh_st_atime
1238 #define st_mtime	fssh_st_mtime
1239 #define st_ctime	fssh_st_ctime
1240 #define st_crtime	fssh_st_crtime
1241 #define st_type		fssh_st_type
1242 #define st_blocks	fssh_st_blocks
1243 
1244 /* extended file types */
1245 #define S_ATTR_DIR			FSSH_S_ATTR_DIR
1246 #define S_ATTR				FSSH_S_ATTR
1247 #define S_INDEX_DIR			FSSH_S_INDEX_DIR
1248 #define S_STR_INDEX			FSSH_S_STR_INDEX
1249 #define S_INT_INDEX			FSSH_S_INT_INDEX
1250 #define S_UINT_INDEX		FSSH_S_UINT_INDEX
1251 #define S_LONG_LONG_INDEX	FSSH_S_LONG_LONG_INDEX
1252 #define S_ULONG_LONG_INDEX	FSSH_S_ULONG_LONG_INDEX
1253 #define S_FLOAT_INDEX		FSSH_S_FLOAT_INDEX
1254 #define S_DOUBLE_INDEX		FSSH_S_DOUBLE_INDEX
1255 #define S_ALLOW_DUPS		FSSH_S_ALLOW_DUPS
1256 
1257 /* link types */
1258 #define S_LINK_SELF_HEALING	FSSH_S_LINK_SELF_HEALING
1259 #define S_LINK_AUTO_DELETE	FSSH_S_LINK_AUTO_DELETE
1260 
1261 /* standard file types */
1262 #define S_IFMT	FSSH_S_IFMT
1263 #define S_IFLNK	FSSH_S_IFLNK
1264 #define S_IFREG	FSSH_S_IFREG
1265 #define S_IFBLK	FSSH_S_IFBLK
1266 #define S_IFDIR	FSSH_S_IFDIR
1267 #define S_IFCHR	FSSH_S_IFCHR
1268 #define S_IFIFO	FSSH_S_IFIFO
1269 
1270 #define S_ISREG(mode)	FSSH_S_ISREG(mode)
1271 #define S_ISLNK(mode)	FSSH_S_ISLNK(mode)
1272 #define S_ISBLK(mode)	FSSH_S_ISBLK(mode)
1273 #define S_ISDIR(mode)	FSSH_S_ISDIR(mode)
1274 #define S_ISCHR(mode)	FSSH_S_ISCHR(mode)
1275 #define S_ISFIFO(mode)	FSSH_S_ISFIFO(mode)
1276 #define S_ISINDEX(mode)	FSSH_S_ISINDEX(mode)
1277 
1278 #define S_IUMSK	FSSH_S_IUMSK
1279 
1280 #define S_ISUID	FSSH_S_ISUID
1281 #define S_ISGID	FSSH_S_ISGID
1282 
1283 #define S_ISVTX	FSSH_S_ISVTX
1284 
1285 #define S_IRWXU	FSSH_S_IRWXU
1286 #define S_IRUSR	FSSH_S_IRUSR
1287 #define S_IWUSR	FSSH_S_IWUSR
1288 #define S_IXUSR	FSSH_S_IXUSR
1289 #define S_IRWXG	FSSH_S_IRWXG
1290 #define S_IRGRP	FSSH_S_IRGRP
1291 #define S_IWGRP	FSSH_S_IWGRP
1292 #define S_IXGRP	FSSH_S_IXGRP
1293 #define S_IRWXO	FSSH_S_IRWXO
1294 #define S_IROTH	FSSH_S_IROTH
1295 #define S_IWOTH	FSSH_S_IWOTH
1296 #define S_IXOTH	FSSH_S_IXOTH
1297 
1298 #define ACCESSPERMS	FSSH_ACCESSPERMS
1299 #define ALLPERMS	FSSH_ALLPERMS
1300 #define DEFFILEMODE	FSSH_DEFFILEMODE
1301 
1302 #define chmod	fssh_chmod
1303 #define fchmod	fssh_fchmod
1304 #define mkdir	fssh_mkdir
1305 #define mkfifo	fssh_mkfifo
1306 #define umask	fssh_umask
1307 
1308 //#define stat	fssh_stat
1309 	// Already mapped above for "struct stat".
1310 #define fstat	fssh_fstat
1311 #define lstat	fssh_lstat
1312 
1313 
1314 ////////////////////////////////////////////////////////////////////////////////
1315 // #pragma mark - fssh_stdio.h
1316 
1317 #define EOF	FSSH_EOF
1318 
1319 /* file operations */
1320 #define remove		fssh_remove
1321 #define rename		fssh_rename
1322 
1323 /* formatted I/O */
1324 #define sprintf		fssh_sprintf
1325 #define snprintf	fssh_snprintf
1326 #define vsprintf	fssh_vsprintf
1327 #define vsnprintf	fssh_vsnprintf
1328 
1329 #define sscanf		fssh_sscanf
1330 #define vsscanf		fssh_vsscanf
1331 
1332 
1333 ////////////////////////////////////////////////////////////////////////////////
1334 // #pragma mark - fssh_string.h
1335 
1336 /* memXXX() functions */
1337 #define memchr		fssh_memchr
1338 #define memcmp		fssh_memcmp
1339 #define memcpy		fssh_memcpy
1340 #define memccpy		fssh_memccpy
1341 #define memmove		fssh_memmove
1342 #define memset		fssh_memset
1343 
1344 /* string functions */
1345 #define strcpy		fssh_strcpy
1346 #define strncpy		fssh_strncpy
1347 #define strcat		fssh_strcat
1348 #define strncat		fssh_strncat
1349 #define strlen		fssh_strlen
1350 #define strcmp		fssh_strcmp
1351 #define strncmp		fssh_strncmp
1352 #define strchr		fssh_strchr
1353 #define strrchr		fssh_strrchr
1354 #define strstr		fssh_strstr
1355 #define strchrnul	fssh_strchrnul
1356 #define strpbrk		fssh_strpbrk
1357 #define strtok		fssh_strtok
1358 #define strtok_r	fssh_strtok_r
1359 #define strspn		fssh_strspn
1360 #define strcspn		fssh_strcspn
1361 #define strcoll		fssh_strcoll
1362 #define strxfrm		fssh_strxfrm
1363 #define strerror	fssh_strerror
1364 #define strerror_r	fssh_strerror_r
1365 
1366 /* non-standard string functions */
1367 #define strcasecmp	fssh_strcasecmp
1368 #define strncasecmp	fssh_strncasecmp
1369 #define strcasestr	fssh_strcasestr
1370 #define strdup		fssh_strdup
1371 #define stpcpy		fssh_stpcpy
1372 #define strtcopy	fssh_strtcopy
1373 #define strlcat		fssh_strlcat
1374 #define strlcpy		fssh_strlcpy
1375 #define strnlen		fssh_strnlen
1376 
1377 #define ffs			fssh_ffs
1378 #define index		fssh_index
1379 #define rindex		fssh_rindex
1380 
1381 
1382 ////////////////////////////////////////////////////////////////////////////////
1383 // #pragma mark - fssh_time.h
1384 
1385 #define clock_t		fssh_clock_t
1386 #define time_t		fssh_time_t
1387 #define suseconds_t	fssh_suseconds_t
1388 #define useconds_t	fssh_useconds_t
1389 
1390 #undef CLOCKS_PER_SEC
1391 #undef CLK_TCK
1392 #undef MAX_TIMESTR
1393 
1394 #define CLOCKS_PER_SEC	FSSH_CLOCKS_PER_SEC
1395 #define CLK_TCK			FSSH_CLK_TCK
1396 #define MAX_TIMESTR		FSSH_MAX_TIMESTR
1397 
1398 #define timespec	fssh_timespec
1399 #define itimerspec	fssh_itimerspec
1400 #define tm			fssh_tm
1401 
1402 /* special timezone support */
1403 #define tzname		fssh_tzname
1404 #define daylight	fssh_daylight
1405 #define timezone	fssh_timezone
1406 
1407 #define clock		fssh_clock
1408 #define difftime	fssh_difftime
1409 #define mktime		fssh_mktime
1410 #define time		fssh_time
1411 #define asctime		fssh_asctime
1412 #define asctime_r	fssh_asctime_r
1413 #define ctime		fssh_ctime
1414 #define ctime_r		fssh_ctime_r
1415 #define gmtime		fssh_gmtime
1416 #define gmtime_r	fssh_gmtime_r
1417 #define localtime	fssh_localtime
1418 #define localtime_r	fssh_localtime_r
1419 #define strftime	fssh_strftime
1420 #define strptime	fssh_strptime
1421 
1422 /* special timezone support */
1423 #define tzset	fssh_tzset
1424 #define stime	fssh_stime
1425 
1426 
1427 ////////////////////////////////////////////////////////////////////////////////
1428 // #pragma mark - fssh_type_constants.h
1429 
1430 #define B_ANY_TYPE						FSSH_B_ANY_TYPE
1431 #define B_ATOM_TYPE						FSSH_B_ATOM_TYPE
1432 #define B_ATOMREF_TYPE					FSSH_B_ATOMREF_TYPE
1433 #define B_BOOL_TYPE						FSSH_B_BOOL_TYPE
1434 #define B_CHAR_TYPE						FSSH_B_CHAR_TYPE
1435 #define B_COLOR_8_BIT_TYPE				FSSH_B_COLOR_8_BIT_TYPE
1436 #define B_DOUBLE_TYPE					FSSH_B_DOUBLE_TYPE
1437 #define B_FLOAT_TYPE					FSSH_B_FLOAT_TYPE
1438 #define B_GRAYSCALE_8_BIT_TYPE			FSSH_B_GRAYSCALE_8_BIT_TYPE
1439 #define B_INT16_TYPE					FSSH_B_INT16_TYPE
1440 #define B_INT32_TYPE					FSSH_B_INT32_TYPE
1441 #define B_INT64_TYPE					FSSH_B_INT64_TYPE
1442 #define B_INT8_TYPE						FSSH_B_INT8_TYPE
1443 #define B_LARGE_ICON_TYPE				FSSH_B_LARGE_ICON_TYPE
1444 #define B_MEDIA_PARAMETER_GROUP_TYPE	FSSH_B_MEDIA_PARAMETER_GROUP_TYPE
1445 #define B_MEDIA_PARAMETER_TYPE			FSSH_B_MEDIA_PARAMETER_TYPE
1446 #define B_MEDIA_PARAMETER_WEB_TYPE		FSSH_B_MEDIA_PARAMETER_WEB_TYPE
1447 #define B_MESSAGE_TYPE					FSSH_B_MESSAGE_TYPE
1448 #define B_MESSENGER_TYPE				FSSH_B_MESSENGER_TYPE
1449 #define B_MIME_TYPE						FSSH_B_MIME_TYPE
1450 #define B_MINI_ICON_TYPE				FSSH_B_MINI_ICON_TYPE
1451 #define B_MONOCHROME_1_BIT_TYPE			FSSH_B_MONOCHROME_1_BIT_TYPE
1452 #define B_OBJECT_TYPE					FSSH_B_OBJECT_TYPE
1453 #define B_OFF_T_TYPE					FSSH_B_OFF_T_TYPE
1454 #define B_PATTERN_TYPE					FSSH_B_PATTERN_TYPE
1455 #define B_POINTER_TYPE					FSSH_B_POINTER_TYPE
1456 #define B_POINT_TYPE					FSSH_B_POINT_TYPE
1457 #define B_PROPERTY_INFO_TYPE			FSSH_B_PROPERTY_INFO_TYPE
1458 #define B_RAW_TYPE						FSSH_B_RAW_TYPE
1459 #define B_RECT_TYPE						FSSH_B_RECT_TYPE
1460 #define B_REF_TYPE						FSSH_B_REF_TYPE
1461 #define B_RGB_32_BIT_TYPE				FSSH_B_RGB_32_BIT_TYPE
1462 #define B_RGB_COLOR_TYPE				FSSH_B_RGB_COLOR_TYPE
1463 #define B_SIZE_T_TYPE					FSSH_B_SIZE_T_TYPE
1464 #define B_SSIZE_T_TYPE					FSSH_B_SSIZE_T_TYPE
1465 #define B_STRING_TYPE					FSSH_B_STRING_TYPE
1466 #define B_TIME_TYPE						FSSH_B_TIME_TYPE
1467 #define B_UINT16_TYPE					FSSH_B_UINT16_TYPE
1468 #define B_UINT32_TYPE					FSSH_B_UINT32_TYPE
1469 #define B_UINT64_TYPE					FSSH_B_UINT64_TYPE
1470 #define B_UINT8_TYPE					FSSH_B_UINT8_TYPE
1471 #define B_VECTOR_ICON_TYPE				FSSH_B_VECTOR_ICON_TYPE
1472 #define B_ASCII_TYPE					FSSH_B_ASCII_TYPE
1473 
1474 //----- System-wide MIME types for handling URL's ------------------------------
1475 
1476 #define B_URL_HTTP		FSSH_B_URL_HTTP
1477 #define B_URL_HTTPS		FSSH_B_URL_HTTPS
1478 #define B_URL_FTP		FSSH_B_URL_FTP
1479 #define B_URL_GOPHER	FSSH_B_URL_GOPHER
1480 #define B_URL_MAILTO	FSSH_B_URL_MAILTO
1481 #define B_URL_NEWS		FSSH_B_URL_NEWS
1482 #define B_URL_NNTP		FSSH_B_URL_NNTP
1483 #define B_URL_TELNET	FSSH_B_URL_TELNET
1484 #define B_URL_RLOGIN	FSSH_B_URL_RLOGIN
1485 #define B_URL_TN3270	FSSH_B_URL_TN3270
1486 #define B_URL_WAIS		FSSH_B_URL_WAIS
1487 #define B_URL_FILE		FSSH_B_URL_FILE
1488 
1489 
1490 ////////////////////////////////////////////////////////////////////////////////
1491 // #pragma mark - fssh_types.h
1492 
1493 #define addr_t			fssh_addr_t
1494 #define phys_addr_t		fssh_phys_addr_t
1495 #define phys_size_t		fssh_phys_size_t
1496 #define generic_addr_t	fssh_generic_addr_t
1497 #define generic_size_t	fssh_generic_size_t
1498 
1499 #define dev_t			fssh_dev_t
1500 #define ino_t			fssh_ino_t
1501 
1502 #define size_t			fssh_size_t
1503 #define ssize_t			fssh_ssize_t
1504 #define off_t			fssh_off_t
1505 
1506 #define bigtime_t		fssh_bigtime_t
1507 
1508 #define status_t		fssh_status_t
1509 #define type_code		fssh_type_code
1510 
1511 #define mode_t			fssh_mode_t
1512 #define nlink_t			fssh_nlink_t
1513 #define uid_t			fssh_uid_t
1514 #define gid_t			fssh_gid_t
1515 #define pid_t			fssh_pid_t
1516 
1517 /* printf()/scanf() format strings for [u]int* types */
1518 #define B_PRId8			FSSH_B_PRId8
1519 #define B_PRIi8			FSSH_B_PRIi8
1520 #define B_PRId16		FSSH_B_PRId16
1521 #define B_PRIi16		FSSH_B_PRIi16
1522 #define B_PRId32		FSSH_B_PRId32
1523 #define B_PRIi32		FSSH_B_PRIi32
1524 #define B_PRId64		FSSH_B_PRId64
1525 #define B_PRIi64		FSSH_B_PRIi64
1526 #define B_PRIu8			FSSH_B_PRIu8
1527 #define B_PRIo8			FSSH_B_PRIo8
1528 #define B_PRIx8			FSSH_B_PRIx8
1529 #define B_PRIX8			FSSH_B_PRIX8
1530 #define B_PRIu16		FSSH_B_PRIu16
1531 #define B_PRIo16		FSSH_B_PRIo16
1532 #define B_PRIx16		FSSH_B_PRIx16
1533 #define B_PRIX16		FSSH_B_PRIX16
1534 #define B_PRIu32		FSSH_B_PRIu32
1535 #define B_PRIo32		FSSH_B_PRIo32
1536 #define B_PRIx32		FSSH_B_PRIx32
1537 #define B_PRIX32		FSSH_B_PRIX32
1538 #define B_PRIu64		FSSH_B_PRIu64
1539 #define B_PRIo64		FSSH_B_PRIo64
1540 #define B_PRIx64		FSSH_B_PRIx64
1541 #define B_PRIX64		FSSH_B_PRIX64
1542 
1543 #define B_SCNd8			FSSH_B_SCNd8
1544 #define B_SCNi8			FSSH_B_SCNi8
1545 #define B_SCNd16		FSSH_B_SCNd16
1546 #define B_SCNi16		FSSH_B_SCNi16
1547 #define B_SCNd32		FSSH_B_SCNd32
1548 #define B_SCNi32		FSSH_B_SCNi32
1549 #define B_SCNd64		FSSH_B_SCNd64
1550 #define B_SCNi64		FSSH_B_SCNi64
1551 #define B_SCNu8			FSSH_B_SCNu8
1552 #define B_SCNo8			FSSH_B_SCNo8
1553 #define B_SCNx8			FSSH_B_SCNx8
1554 #define B_SCNu16		FSSH_B_SCNu16
1555 #define B_SCNu16		FSSH_B_SCNu16
1556 #define B_SCNx16		FSSH_B_SCNx16
1557 #define B_SCNu32		FSSH_B_SCNu32
1558 #define B_SCNo32		FSSH_B_SCNo32
1559 #define B_SCNx32		FSSH_B_SCNx32
1560 #define B_SCNu64		FSSH_B_SCNu64
1561 #define B_SCNo64		FSSH_B_SCNo64
1562 #define B_SCNx64		FSSH_B_SCNx64
1563 
1564 /* printf() format strings for some standard types */
1565 /* size_t */
1566 #define B_PRIuSIZE		FSSH_B_PRIuSIZE
1567 #define B_PRIoSIZE		FSSH_B_PRIoSIZE
1568 #define B_PRIxSIZE		FSSH_B_PRIxSIZE
1569 #define B_PRIXSIZE		FSSH_B_PRIXSIZE
1570 /* ssize_t */
1571 #define B_PRIdSSIZE		FSSH_B_PRIdSSIZE
1572 #define B_PRIiSSIZE		FSSH_B_PRIiSSIZE
1573 /* addr_t */
1574 #define B_PRIuADDR		FSSH_B_PRIuADDR
1575 #define B_PRIoADDR		FSSH_B_PRIoADDR
1576 #define B_PRIxADDR		FSSH_B_PRIxADDR
1577 #define B_PRIXADDR		FSSH_B_PRIXADDR
1578 /* phys_addr_t */
1579 #define B_PRIuPHYSADDR	FSSH_B_PRIuPHYSADDR
1580 #define B_PRIoPHYSADDR	FSSH_B_PRIoPHYSADDR
1581 #define B_PRIxPHYSADDR	FSSH_B_PRIxPHYSADDR
1582 #define B_PRIXPHYSADDR	FSSH_B_PRIXPHYSADDR
1583 /* generic_addr_t */
1584 #define B_PRIuGENADDR	FSSH_B_PRIuGENADDR
1585 #define B_PRIoGENADDR	FSSH_B_PRIoGENADDR
1586 #define B_PRIxGENADDR	FSSH_B_PRIxGENADDR
1587 #define B_PRIXGENADDR	FSSH_B_PRIXGENADDR
1588 /* off_t */
1589 #define B_PRIdOFF		FSSH_B_PRIdOFF
1590 #define B_PRIiOFF		FSSH_B_PRIiOFF
1591 /* dev_t */
1592 #define B_PRIdDEV		FSSH_B_PRIdDEV
1593 #define B_PRIiDEV		FSSH_B_PRIiDEV
1594 /* ino_t */
1595 #define B_PRIdINO		FSSH_B_PRIdINO
1596 #define B_PRIiINO		FSSH_B_PRIiINO
1597 /* time_t */
1598 #define B_PRIdTIME		FSSH_B_PRId32
1599 #define B_PRIiTIME		FSSH_B_PRIi32
1600 
1601 
1602 ////////////////////////////////////////////////////////////////////////////////
1603 // #pragma mark - fssh_uio.h
1604 
1605 #define iovec		fssh_iovec
1606 
1607 #define readv		fssh_readv
1608 #define readv_pos	fssh_readv_pos
1609 #define writev		fssh_writev
1610 #define writev_pos	fssh_writev_pos
1611 
1612 
1613 ////////////////////////////////////////////////////////////////////////////////
1614 // #pragma mark - fssh_unistd.h
1615 
1616 /* access modes */
1617 #define R_OK	FSSH_R_OK
1618 #define W_OK	FSSH_W_OK
1619 #define X_OK	FSSH_X_OK
1620 #define F_OK	FSSH_F_OK
1621 
1622 /* standard file descriptors */
1623 #define STDIN_FILENO	FSSH_STDIN_FILENO
1624 #define STDOUT_FILENO	FSSH_STDOUT_FILENO
1625 #define STDERR_FILENO	FSSH_STDERR_FILENO
1626 
1627 /* lseek() constants */
1628 #define SEEK_SET	FSSH_SEEK_SET
1629 #define SEEK_CUR	FSSH_SEEK_CUR
1630 #define SEEK_END	FSSH_SEEK_END
1631 
1632 /* file functions */
1633 #define access		fssh_access
1634 
1635 #define chdir		fssh_chdir
1636 #define fchdir		fssh_fchdir
1637 #define getcwd		fssh_getcwd
1638 
1639 #define dup			fssh_dup
1640 #define dup2		fssh_dup2
1641 #define close		fssh_close
1642 #define link		fssh_link
1643 #define unlink		fssh_unlink
1644 #define rmdir		fssh_rmdir
1645 
1646 #define readlink	fssh_readlink
1647 #define symlink		fssh_symlink
1648 
1649 #define ftruncate	fssh_ftruncate
1650 #define truncate	fssh_truncate
1651 #define ioctl		fssh_ioctl
1652 
1653 #define read		fssh_read
1654 #define read_pos	fssh_read_pos
1655 #define pread		fssh_pread
1656 #define write		fssh_write
1657 #define write_pos	fssh_write_pos
1658 #define pwrite		fssh_pwrite
1659 #define lseek		fssh_lseek
1660 
1661 #define sync		fssh_sync
1662 #define fsync		fssh_fsync
1663 
1664 /* access permissions */
1665 #define getegid		fssh_getegid
1666 #define geteuid		fssh_geteuid
1667 #define getgid		fssh_getgid
1668 #define getgroups	fssh_getgroups
1669 #define getuid		fssh_getuid
1670 
1671 
1672 ////////////////////////////////////////////////////////////////////////////////
1673 // int types
1674 
1675 #define int8	int8_t
1676 #define uint8	uint8_t
1677 #define int16	int16_t
1678 #define uint16	uint16_t
1679 #define int32	int32_t
1680 #define uint32	uint32_t
1681 #define int64	int64_t
1682 #define uint64	uint64_t
1683 
1684 #define vint32	vint32_t
1685 
1686 
1687 #endif	// _FSSH_API_WRAPPER_H
1688