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