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