1 /* 2 * Copyright 2007, 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 // disk systems 347 #define find_disk_system fssh_find_disk_system 348 349 // jobs 350 #define update_disk_device_job_progress fssh_update_disk_device_job_progress 351 #define update_disk_device_job_extra_progress fssh_update_disk_device_job_extra_progress 352 #define set_disk_device_job_error_message fssh_set_disk_device_job_error_message 353 #define update_disk_device_job_interrupt_properties fssh_update_disk_device_job_interrupt_properties 354 355 356 //////////////////////////////////////////////////////////////////////////////// 357 // #pragma mark - fssh_driver_settings.h 358 359 #define driver_parameter fssh_driver_parameter 360 #define driver_settings fssh_driver_settings 361 362 #define load_driver_settings fssh_load_driver_settings 363 #define unload_driver_settings fssh_unload_driver_settings 364 #define parse_driver_settings_string fssh_parse_driver_settings_string 365 #define get_driver_settings_string fssh_get_driver_settings_string 366 #define delete_driver_settings fssh_delete_driver_settings 367 #define get_driver_parameter fssh_get_driver_parameter 368 #define get_driver_boolean_parameter fssh_get_driver_boolean_parameter 369 #define get_driver_settings fssh_get_driver_settings 370 371 #define B_SAFEMODE_DRIVER_SETTINGS FSSH_B_SAFEMODE_DRIVER_SETTINGS 372 #define B_SAFEMODE_SAFE_MODE FSSH_B_SAFEMODE_SAFE_MODE 373 374 375 //////////////////////////////////////////////////////////////////////////////// 376 // #pragma mark - fssh_drivers.h 377 378 #define device_open_hook fssh_device_open_hook 379 #define device_close_hook fssh_device_close_hook 380 #define device_free_hook fssh_device_free_hook 381 #define device_control_hook fssh_device_control_hook 382 #define device_read_hook fssh_device_read_hook 383 #define device_write_hook fssh_device_write_hook 384 #define device_select_hook fssh_device_select_hook 385 #define device_deselect_hook fssh_device_deselect_hook 386 #define device_read_pages_hook fssh_device_read_pages_hook 387 #define device_write_pages_hook fssh_device_write_pages_hook 388 389 #define B_CUR_DRIVER_API_VERSION FSSH_B_CUR_DRIVER_API_VERSION 390 391 #define device_hooks fssh_device_hooks 392 393 #define init_hardware fssh_init_hardware 394 #define publish_devices fssh_publish_devices 395 #define find_device fssh_find_device 396 #define init_driver fssh_init_driver 397 #define uninit_driver fssh_uninit_driver 398 399 #define api_version fssh_api_version 400 401 #define B_GET_DEVICE_SIZE FSSH_B_GET_DEVICE_SIZE 402 #define B_SET_DEVICE_SIZE FSSH_B_SET_DEVICE_SIZE 403 #define B_SET_NONBLOCKING_IO FSSH_B_SET_NONBLOCKING_IO 404 #define B_SET_BLOCKING_IO FSSH_B_SET_BLOCKING_IO 405 #define B_GET_READ_STATUS FSSH_B_GET_READ_STATUS 406 #define B_GET_WRITE_STATUS FSSH_B_GET_WRITE_STATUS 407 #define B_GET_GEOMETRY FSSH_B_GET_GEOMETRY 408 #define B_GET_DRIVER_FOR_DEVICE FSSH_B_GET_DRIVER_FOR_DEVICE 409 #define B_GET_PARTITION_INFO FSSH_B_GET_PARTITION_INFO 410 #define B_SET_PARTITION FSSH_B_SET_PARTITION 411 #define B_FORMAT_DEVICE FSSH_B_FORMAT_DEVICE 412 #define B_EJECT_DEVICE FSSH_B_EJECT_DEVICE 413 #define B_GET_ICON FSSH_B_GET_ICON 414 #define B_GET_BIOS_GEOMETRY FSSH_B_GET_BIOS_GEOMETRY 415 #define B_GET_MEDIA_STATUS FSSH_B_GET_MEDIA_STATUS 416 #define B_LOAD_MEDIA FSSH_B_LOAD_MEDIA 417 #define B_GET_BIOS_DRIVE_ID FSSH_B_GET_BIOS_DRIVE_ID 418 #define B_SET_UNINTERRUPTABLE_IO FSSH_B_SET_UNINTERRUPTABLE_IO 419 #define B_SET_INTERRUPTABLE_IO FSSH_B_SET_INTERRUPTABLE_IO 420 #define B_FLUSH_DRIVE_CACHE FSSH_B_FLUSH_DRIVE_CACHE 421 #define B_GET_PATH_FOR_DEVICE FSSH_B_GET_PATH_FOR_DEVICE 422 #define B_GET_NEXT_OPEN_DEVICE FSSH_B_GET_NEXT_OPEN_DEVICE 423 #define B_ADD_FIXED_DRIVER FSSH_B_ADD_FIXED_DRIVER 424 #define B_REMOVE_FIXED_DRIVER FSSH_B_REMOVE_FIXED_DRIVER 425 #define B_AUDIO_DRIVER_BASE FSSH_B_AUDIO_DRIVER_BASE 426 #define B_MIDI_DRIVER_BASE FSSH_B_MIDI_DRIVER_BASE 427 #define B_JOYSTICK_DRIVER_BASE FSSH_B_JOYSTICK_DRIVER_BASE 428 #define B_GRAPHIC_DRIVER_BASE FSSH_B_GRAPHIC_DRIVER_BASE 429 #define B_DEVICE_OP_CODES_END FSSH_B_DEVICE_OP_CODES_END 430 431 #define device_geometry fssh_device_geometry 432 433 #define B_DISK FSSH_B_DISK 434 #define B_TAPE FSSH_B_TAPE 435 #define B_PRINTER FSSH_B_PRINTER 436 #define B_CPU FSSH_B_CPU 437 #define B_WORM FSSH_B_WORM 438 #define B_CD FSSH_B_CD 439 #define B_SCANNER FSSH_B_SCANNER 440 #define B_OPTICAL FSSH_B_OPTICAL 441 #define B_JUKEBOX FSSH_B_JUKEBOX 442 #define B_NETWORK FSSH_B_NETWORK 443 444 445 #define partition_info fssh_partition_info 446 #define driver_path fssh_driver_path 447 #define open_device_iterator fssh_open_device_iterator 448 #define device_icon fssh_device_icon 449 450 451 //////////////////////////////////////////////////////////////////////////////// 452 // #pragma mark - fssh_errors.h 453 454 /* Error baselines */ 455 #define B_GENERAL_ERROR_BASE FSSH_B_GENERAL_ERROR_BASE 456 #define B_OS_ERROR_BASE FSSH_B_OS_ERROR_BASE 457 #define B_APP_ERROR_BASE FSSH_B_APP_ERROR_BASE 458 #define B_INTERFACE_ERROR_BASE FSSH_B_INTERFACE_ERROR_BASE 459 #define B_MEDIA_ERROR_BASE FSSH_B_MEDIA_ERROR_BASE 460 #define B_TRANSLATION_ERROR_BASE FSSH_B_TRANSLATION_ERROR_BASE 461 #define B_MIDI_ERROR_BASE FSSH_B_MIDI_ERROR_BASE 462 #define B_STORAGE_ERROR_BASE FSSH_B_STORAGE_ERROR_BASE 463 #define B_POSIX_ERROR_BASE FSSH_B_POSIX_ERROR_BASE 464 #define B_MAIL_ERROR_BASE FSSH_B_MAIL_ERROR_BASE 465 #define B_PRINT_ERROR_BASE FSSH_B_PRINT_ERROR_BASE 466 #define B_DEVICE_ERROR_BASE FSSH_B_DEVICE_ERROR_BASE 467 468 /* Developer-defined errors start at (B_ERRORS_END+1) */ 469 #define B_ERRORS_END FSSH_B_ERRORS_END 470 471 /* General Errors */ 472 #define B_NO_MEMORY FSSH_B_NO_MEMORY 473 #define B_IO_ERROR FSSH_B_IO_ERROR 474 #define B_PERMISSION_DENIED FSSH_B_PERMISSION_DENIED 475 #define B_BAD_INDEX FSSH_B_BAD_INDEX 476 #define B_BAD_TYPE FSSH_B_BAD_TYPE 477 #define B_BAD_VALUE FSSH_B_BAD_VALUE 478 #define B_MISMATCHED_VALUES FSSH_B_MISMATCHED_VALUES 479 #define B_NAME_NOT_FOUND FSSH_B_NAME_NOT_FOUND 480 #define B_NAME_IN_USE FSSH_B_NAME_IN_USE 481 #define B_TIMED_OUT FSSH_B_TIMED_OUT 482 #define B_INTERRUPTED FSSH_B_INTERRUPTED 483 #define B_WOULD_BLOCK FSSH_B_WOULD_BLOCK 484 #define B_CANCELED FSSH_B_CANCELED 485 #define B_NO_INIT FSSH_B_NO_INIT 486 #define B_BUSY FSSH_B_BUSY 487 #define B_NOT_ALLOWED FSSH_B_NOT_ALLOWED 488 #define B_BAD_DATA FSSH_B_BAD_DATA 489 #define B_DONT_DO_THAT FSSH_B_DONT_DO_THAT 490 491 #define B_ERROR FSSH_B_ERROR 492 #define B_OK FSSH_B_OK 493 #define B_NO_ERROR FSSH_B_NO_ERROR 494 495 /* Kernel Kit Errors */ 496 #define B_BAD_SEM_ID FSSH_B_BAD_SEM_ID 497 #define B_NO_MORE_SEMS FSSH_B_NO_MORE_SEMS 498 499 #define B_BAD_THREAD_ID FSSH_B_BAD_THREAD_ID 500 #define B_NO_MORE_THREADS FSSH_B_NO_MORE_THREADS 501 #define B_BAD_THREAD_STATE FSSH_B_BAD_THREAD_STATE 502 #define B_BAD_TEAM_ID FSSH_B_BAD_TEAM_ID 503 #define B_NO_MORE_TEAMS FSSH_B_NO_MORE_TEAMS 504 505 #define B_BAD_PORT_ID FSSH_B_BAD_PORT_ID 506 #define B_NO_MORE_PORTS FSSH_B_NO_MORE_PORTS 507 508 #define B_BAD_IMAGE_ID FSSH_B_BAD_IMAGE_ID 509 #define B_BAD_ADDRESS FSSH_B_BAD_ADDRESS 510 #define B_NOT_AN_EXECUTABLE FSSH_B_NOT_AN_EXECUTABLE 511 #define B_MISSING_LIBRARY FSSH_B_MISSING_LIBRARY 512 #define B_MISSING_SYMBOL FSSH_B_MISSING_SYMBOL 513 514 #define B_DEBUGGER_ALREADY_INSTALLED FSSH_B_DEBUGGER_ALREADY_INSTALLED 515 516 /* Application Kit Errors */ 517 #define B_BAD_REPLY FSSH_B_BAD_REPLY 518 #define B_DUPLICATE_REPLY FSSH_B_DUPLICATE_REPLY 519 #define B_MESSAGE_TO_SELF FSSH_B_MESSAGE_TO_SELF 520 #define B_BAD_HANDLER FSSH_B_BAD_HANDLER 521 #define B_ALREADY_RUNNING FSSH_B_ALREADY_RUNNING 522 #define B_LAUNCH_FAILED FSSH_B_LAUNCH_FAILED 523 #define B_AMBIGUOUS_APP_LAUNCH FSSH_B_AMBIGUOUS_APP_LAUNCH 524 #define B_UNKNOWN_MIME_TYPE FSSH_B_UNKNOWN_MIME_TYPE 525 #define B_BAD_SCRIPT_SYNTAX FSSH_B_BAD_SCRIPT_SYNTAX 526 #define B_LAUNCH_FAILED_NO_RESOLVE_LINK FSSH_B_LAUNCH_FAILED_NO_RESOLVE_LINK 527 #define B_LAUNCH_FAILED_EXECUTABLE FSSH_B_LAUNCH_FAILED_EXECUTABLE 528 #define B_LAUNCH_FAILED_APP_NOT_FOUND FSSH_B_LAUNCH_FAILED_APP_NOT_FOUND 529 #define B_LAUNCH_FAILED_APP_IN_TRASH FSSH_B_LAUNCH_FAILED_APP_IN_TRASH 530 #define B_LAUNCH_FAILED_NO_PREFERRED_APP FSSH_B_LAUNCH_FAILED_NO_PREFERRED_APP 531 #define B_LAUNCH_FAILED_FILES_APP_NOT_FOUND FSSH_B_LAUNCH_FAILED_FILES_APP_NOT_FOUND 532 #define B_BAD_MIME_SNIFFER_RULE FSSH_B_BAD_MIME_SNIFFER_RULE 533 #define B_NOT_A_MESSAGE FSSH_B_NOT_A_MESSAGE 534 #define B_SHUTDOWN_CANCELLED FSSH_B_SHUTDOWN_CANCELLED 535 #define B_SHUTTING_DOWN FSSH_B_SHUTTING_DOWN 536 537 /* Storage Kit/File System Errors */ 538 #define B_FILE_ERROR FSSH_B_FILE_ERROR 539 #define B_FILE_NOT_FOUND FSSH_B_FILE_NOT_FOUND 540 #define B_FILE_EXISTS FSSH_B_FILE_EXISTS 541 #define B_ENTRY_NOT_FOUND FSSH_B_ENTRY_NOT_FOUND 542 #define B_NAME_TOO_LONG FSSH_B_NAME_TOO_LONG 543 #define B_NOT_A_DIRECTORY FSSH_B_NOT_A_DIRECTORY 544 #define B_DIRECTORY_NOT_EMPTY FSSH_B_DIRECTORY_NOT_EMPTY 545 #define B_DEVICE_FULL FSSH_B_DEVICE_FULL 546 #define B_READ_ONLY_DEVICE FSSH_B_READ_ONLY_DEVICE 547 #define B_IS_A_DIRECTORY FSSH_B_IS_A_DIRECTORY 548 #define B_NO_MORE_FDS FSSH_B_NO_MORE_FDS 549 #define B_CROSS_DEVICE_LINK FSSH_B_CROSS_DEVICE_LINK 550 #define B_LINK_LIMIT FSSH_B_LINK_LIMIT 551 #define B_BUSTED_PIPE FSSH_B_BUSTED_PIPE 552 #define B_UNSUPPORTED FSSH_B_UNSUPPORTED 553 #define B_PARTITION_TOO_SMALL FSSH_B_PARTITION_TOO_SMALL 554 555 /* POSIX Errors */ 556 #define E2BIG FSSH_E2BIG 557 #define ECHILD FSSH_ECHILD 558 #define EDEADLK FSSH_EDEADLK 559 #define EFBIG FSSH_EFBIG 560 #define EMLINK FSSH_EMLINK 561 #define ENFILE FSSH_ENFILE 562 #define ENODEV FSSH_ENODEV 563 #define ENOLCK FSSH_ENOLCK 564 #define ENOSYS FSSH_ENOSYS 565 #define ENOTTY FSSH_ENOTTY 566 #define ENXIO FSSH_ENXIO 567 #define ESPIPE FSSH_ESPIPE 568 #define ESRCH FSSH_ESRCH 569 #define EFPOS FSSH_EFPOS 570 #define ESIGPARM FSSH_ESIGPARM 571 #define EDOM FSSH_EDOM 572 #define ERANGE FSSH_ERANGE 573 #define EPROTOTYPE FSSH_EPROTOTYPE 574 #define EPROTONOSUPPORT FSSH_EPROTONOSUPPORT 575 #define EPFNOSUPPORT FSSH_EPFNOSUPPORT 576 #define EAFNOSUPPORT FSSH_EAFNOSUPPORT 577 #define EADDRINUSE FSSH_EADDRINUSE 578 #define EADDRNOTAVAIL FSSH_EADDRNOTAVAIL 579 #define ENETDOWN FSSH_ENETDOWN 580 #define ENETUNREACH FSSH_ENETUNREACH 581 #define ENETRESET FSSH_ENETRESET 582 #define ECONNABORTED FSSH_ECONNABORTED 583 #define ECONNRESET FSSH_ECONNRESET 584 #define EISCONN FSSH_EISCONN 585 #define ENOTCONN FSSH_ENOTCONN 586 #define ESHUTDOWN FSSH_ESHUTDOWN 587 #define ECONNREFUSED FSSH_ECONNREFUSED 588 #define EHOSTUNREACH FSSH_EHOSTUNREACH 589 #define ENOPROTOOPT FSSH_ENOPROTOOPT 590 #define ENOBUFS FSSH_ENOBUFS 591 #define EINPROGRESS FSSH_EINPROGRESS 592 #define EALREADY FSSH_EALREADY 593 #define EILSEQ FSSH_EILSEQ 594 #define ENOMSG FSSH_ENOMSG 595 #define ESTALE FSSH_ESTALE 596 #define EOVERFLOW FSSH_EOVERFLOW 597 #define EMSGSIZE FSSH_EMSGSIZE 598 #define EOPNOTSUPP FSSH_EOPNOTSUPP 599 #define ENOTSOCK FSSH_ENOTSOCK 600 #define EHOSTDOWN FSSH_EHOSTDOWN 601 #define EBADMSG FSSH_EBADMSG 602 #define ECANCELED FSSH_ECANCELED 603 #define EDESTADDRREQ FSSH_EDESTADDRREQ 604 #define EDQUOT FSSH_EDQUOT 605 #define EIDRM FSSH_EIDRM 606 #define EMULTIHOP FSSH_EMULTIHOP 607 #define ENODATA FSSH_ENODATA 608 #define ENOLINK FSSH_ENOLINK 609 #define ENOSR FSSH_ENOSR 610 #define ENOSTR FSSH_ENOSTR 611 #define ENOTSUP FSSH_ENOTSUP 612 #define EPROTO FSSH_EPROTO 613 #define ETIME FSSH_ETIME 614 #define ETXTBSY FSSH_ETXTBSY 615 616 /* POSIX errors that can be mapped to BeOS error codes */ 617 #define ENOMEM FSSH_ENOMEM 618 #define EACCES FSSH_EACCES 619 #define EINTR FSSH_EINTR 620 #define EIO FSSH_EIO 621 #define EBUSY FSSH_EBUSY 622 #define EFAULT FSSH_EFAULT 623 #define ETIMEDOUT FSSH_ETIMEDOUT 624 #define EAGAIN FSSH_EAGAIN 625 #define EWOULDBLOCK FSSH_EWOULDBLOCK 626 #define EBADF FSSH_EBADF 627 #define EEXIST FSSH_EEXIST 628 #define EINVAL FSSH_EINVAL 629 #define ENAMETOOLONG FSSH_ENAMETOOLONG 630 #define ENOENT FSSH_ENOENT 631 #define EPERM FSSH_EPERM 632 #define ENOTDIR FSSH_ENOTDIR 633 #define EISDIR FSSH_EISDIR 634 #define ENOTEMPTY FSSH_ENOTEMPTY 635 #define ENOSPC FSSH_ENOSPC 636 #define EROFS FSSH_EROFS 637 #define EMFILE FSSH_EMFILE 638 #define EXDEV FSSH_EXDEV 639 #define ELOOP FSSH_ELOOP 640 #define ENOEXEC FSSH_ENOEXEC 641 #define EPIPE FSSH_EPIPE 642 643 /* new error codes that can be mapped to POSIX errors */ 644 #define B_BUFFER_OVERFLOW FSSH_B_BUFFER_OVERFLOW 645 #define B_TOO_MANY_ARGS FSSH_B_TOO_MANY_ARGS 646 #define B_FILE_TOO_LARGE FSSH_B_FILE_TOO_LARGE 647 #define B_RESULT_NOT_REPRESENTABLE FSSH_B_RESULT_NOT_REPRESENTABLE 648 #define B_DEVICE_NOT_FOUND FSSH_B_DEVICE_NOT_FOUND 649 #define B_NOT_SUPPORTED FSSH_B_NOT_SUPPORTED 650 651 /* Media Kit Errors */ 652 #define B_STREAM_NOT_FOUND FSSH_B_STREAM_NOT_FOUND 653 #define B_SERVER_NOT_FOUND FSSH_B_SERVER_NOT_FOUND 654 #define B_RESOURCE_NOT_FOUND FSSH_B_RESOURCE_NOT_FOUND 655 #define B_RESOURCE_UNAVAILABLE FSSH_B_RESOURCE_UNAVAILABLE 656 #define B_BAD_SUBSCRIBER FSSH_B_BAD_SUBSCRIBER 657 #define B_SUBSCRIBER_NOT_ENTERED FSSH_B_SUBSCRIBER_NOT_ENTERED 658 #define B_BUFFER_NOT_AVAILABLE FSSH_B_BUFFER_NOT_AVAILABLE 659 #define B_LAST_BUFFER_ERROR FSSH_B_LAST_BUFFER_ERROR 660 661 /* Mail Kit Errors */ 662 #define B_MAIL_NO_DAEMON FSSH_B_MAIL_NO_DAEMON 663 #define B_MAIL_UNKNOWN_USER FSSH_B_MAIL_UNKNOWN_USER 664 #define B_MAIL_WRONG_PASSWORD FSSH_B_MAIL_WRONG_PASSWORD 665 #define B_MAIL_UNKNOWN_HOST FSSH_B_MAIL_UNKNOWN_HOST 666 #define B_MAIL_ACCESS_ERROR FSSH_B_MAIL_ACCESS_ERROR 667 #define B_MAIL_UNKNOWN_FIELD FSSH_B_MAIL_UNKNOWN_FIELD 668 #define B_MAIL_NO_RECIPIENT FSSH_B_MAIL_NO_RECIPIENT 669 #define B_MAIL_INVALID_MAIL FSSH_B_MAIL_INVALID_MAIL 670 671 /* Printing Errors */ 672 #define B_NO_PRINT_SERVER FSSH_B_NO_PRINT_SERVER 673 674 /* Device Kit Errors */ 675 #define B_DEV_INVALID_IOCTL FSSH_B_DEV_INVALID_IOCTL 676 #define B_DEV_NO_MEMORY FSSH_B_DEV_NO_MEMORY 677 #define B_DEV_BAD_DRIVE_NUM FSSH_B_DEV_BAD_DRIVE_NUM 678 #define B_DEV_NO_MEDIA FSSH_B_DEV_NO_MEDIA 679 #define B_DEV_UNREADABLE FSSH_B_DEV_UNREADABLE 680 #define B_DEV_FORMAT_ERROR FSSH_B_DEV_FORMAT_ERROR 681 #define B_DEV_TIMEOUT FSSH_B_DEV_TIMEOUT 682 #define B_DEV_RECALIBRATE_ERROR FSSH_B_DEV_RECALIBRATE_ERROR 683 #define B_DEV_SEEK_ERROR FSSH_B_DEV_SEEK_ERROR 684 #define B_DEV_ID_ERROR FSSH_B_DEV_ID_ERROR 685 #define B_DEV_READ_ERROR FSSH_B_DEV_READ_ERROR 686 #define B_DEV_WRITE_ERROR FSSH_B_DEV_WRITE_ERROR 687 #define B_DEV_NOT_READY FSSH_B_DEV_NOT_READY 688 #define B_DEV_MEDIA_CHANGED FSSH_B_DEV_MEDIA_CHANGED 689 #define B_DEV_MEDIA_CHANGE_REQUESTED FSSH_B_DEV_MEDIA_CHANGE_REQUESTED 690 #define B_DEV_RESOURCE_CONFLICT FSSH_B_DEV_RESOURCE_CONFLICT 691 #define B_DEV_CONFIGURATION_ERROR FSSH_B_DEV_CONFIGURATION_ERROR 692 #define B_DEV_DISABLED_BY_USER FSSH_B_DEV_DISABLED_BY_USER 693 #define B_DEV_DOOR_OPEN FSSH_B_DEV_DOOR_OPEN 694 695 #define B_DEV_INVALID_PIPE FSSH_B_DEV_INVALID_PIPE 696 #define B_DEV_CRC_ERROR FSSH_B_DEV_CRC_ERROR 697 #define B_DEV_STALLED FSSH_B_DEV_STALLED 698 #define B_DEV_BAD_PID FSSH_B_DEV_BAD_PID 699 #define B_DEV_UNEXPECTED_PID FSSH_B_DEV_UNEXPECTED_PID 700 #define B_DEV_DATA_OVERRUN FSSH_B_DEV_DATA_OVERRUN 701 #define B_DEV_DATA_UNDERRUN FSSH_B_DEV_DATA_UNDERRUN 702 #define B_DEV_FIFO_OVERRUN FSSH_B_DEV_FIFO_OVERRUN 703 #define B_DEV_FIFO_UNDERRUN FSSH_B_DEV_FIFO_UNDERRUN 704 #define B_DEV_PENDING FSSH_B_DEV_PENDING 705 #define B_DEV_MULTIPLE_ERRORS FSSH_B_DEV_MULTIPLE_ERRORS 706 #define B_DEV_TOO_LATE FSSH_B_DEV_TOO_LATE 707 708 709 //////////////////////////////////////////////////////////////////////////////// 710 // #pragma mark - fssh_errno.h 711 712 #define ENOERR FSSH_ENOERR 713 #define EOK FSSH_EOK 714 715 #define errno fssh_errno 716 717 718 //////////////////////////////////////////////////////////////////////////////// 719 // #pragma mark - fssh_fcntl.h 720 721 /* commands that can be passed to fcntl() */ 722 #define F_DUPFD FSSH_F_DUPFD 723 #define F_GETFD FSSH_F_GETFD 724 #define F_SETFD FSSH_F_SETFD 725 #define F_GETFL FSSH_F_GETFL 726 #define F_SETFL FSSH_F_SETFL 727 #define F_GETLK FSSH_F_GETLK 728 #define F_SETLK FSSH_F_SETLK 729 #define F_SETLKW FSSH_F_SETLKW 730 731 /* advisory locking types */ 732 #define F_RDLCK FSSH_F_RDLCK 733 #define F_UNLCK FSSH_F_UNLCK 734 #define F_WRLCK FSSH_F_WRLCK 735 736 /* file descriptor flags for fcntl() */ 737 #define FD_CLOEXEC FSSH_FD_CLOEXEC 738 739 /* file access modes for open() */ 740 #define O_RDONLY FSSH_O_RDONLY 741 #define O_WRONLY FSSH_O_WRONLY 742 #define O_RDWR FSSH_O_RDWR 743 #define O_ACCMODE FSSH_O_ACCMODE 744 #define O_RWMASK FSSH_O_RWMASK 745 746 /* flags for open() */ 747 #define O_EXCL FSSH_O_EXCL 748 #define O_CREAT FSSH_O_CREAT 749 #define O_TRUNC FSSH_O_TRUNC 750 #define O_NOCTTY FSSH_O_NOCTTY 751 #define O_NOTRAVERSE FSSH_O_NOTRAVERSE 752 753 /* flags for open() and fcntl() */ 754 #define O_CLOEXEC FSSH_O_CLOEXEC 755 #define O_NONBLOCK FSSH_O_NONBLOCK 756 #define O_APPEND FSSH_O_APPEND 757 #define O_TEXT FSSH_O_TEXT 758 #define O_BINARY FSSH_O_BINARY 759 #define O_SYNC FSSH_O_SYNC 760 #define O_RSYNC FSSH_O_RSYNC 761 #define O_DSYNC FSSH_O_DSYNC 762 763 #define O_NOFOLLOW FSSH_O_NOFOLLOW 764 #define O_NOCACHE FSSH_O_NOCACHE 765 #define O_DIRECT FSSH_O_DIRECT 766 #define O_MOUNT FSSH_O_MOUNT 767 #define O_TEMPORARY FSSH_O_TEMPORARY 768 #define O_SHLOCK FSSH_O_SHLOCK 769 #define O_EXLOCK FSSH_O_EXLOCK 770 771 #define S_IREAD FSSH_S_IREAD 772 #define S_IWRITE FSSH_S_IWRITE 773 774 #define creat fssh_creat 775 #define open fssh_open 776 #define fcntl fssh_fcntl 777 778 779 //////////////////////////////////////////////////////////////////////////////// 780 // #pragma mark - fssh_fs_attr.h 781 782 #define attr_info fssh_attr_info 783 784 785 //////////////////////////////////////////////////////////////////////////////// 786 // #pragma mark - fssh_fs_cache.h 787 788 #define transaction_notification_hook fssh_transaction_notification_hook 789 790 /* transactions */ 791 #define cache_start_transaction fssh_cache_start_transaction 792 #define cache_sync_transaction fssh_cache_sync_transaction 793 #define cache_end_transaction fssh_cache_end_transaction 794 #define cache_abort_transaction fssh_cache_abort_transaction 795 #define cache_detach_sub_transaction fssh_cache_detach_sub_transaction 796 #define cache_abort_sub_transaction fssh_cache_abort_sub_transaction 797 #define cache_start_sub_transaction fssh_cache_start_sub_transaction 798 #define cache_next_block_in_transaction fssh_cache_next_block_in_transaction 799 #define cache_blocks_in_transaction fssh_cache_blocks_in_transaction 800 #define cache_blocks_in_sub_transaction fssh_cache_blocks_in_sub_transaction 801 802 /* block cache */ 803 #define block_cache_delete fssh_block_cache_delete 804 #define block_cache_create fssh_block_cache_create 805 #define block_cache_sync fssh_block_cache_sync 806 #define block_cache_sync_etc fssh_block_cache_sync_etc 807 #define block_cache_make_writable fssh_block_cache_make_writable 808 #define block_cache_get_writable_etc fssh_block_cache_get_writable_etc 809 #define block_cache_get_writable fssh_block_cache_get_writable 810 #define block_cache_get_empty fssh_block_cache_get_empty 811 #define block_cache_get_etc fssh_block_cache_get_etc 812 #define block_cache_get fssh_block_cache_get 813 #define block_cache_set_dirty fssh_block_cache_set_dirty 814 #define block_cache_put fssh_block_cache_put 815 816 /* file cache */ 817 #define file_cache_create fssh_file_cache_create 818 #define file_cache_delete fssh_file_cache_delete 819 #define file_cache_set_size fssh_file_cache_set_size 820 #define file_cache_sync fssh_file_cache_sync 821 #define file_cache_invalidate_file_map fssh_file_cache_invalidate_file_map 822 823 #define file_cache_read_pages fssh_file_cache_read_pages 824 #define file_cache_write_pages fssh_file_cache_write_pages 825 #define file_cache_read fssh_file_cache_read 826 #define file_cache_write fssh_file_cache_write 827 828 829 //////////////////////////////////////////////////////////////////////////////// 830 // #pragma mark - fssh_fs_index.h 831 832 #define index_info fssh_index_info 833 834 835 //////////////////////////////////////////////////////////////////////////////// 836 // #pragma mark - fssh_fs_info.h 837 838 /* fs_info.flags */ 839 #define B_FS_IS_READONLY FSSH_B_FS_IS_READONLY 840 #define B_FS_IS_REMOVABLE FSSH_B_FS_IS_REMOVABLE 841 #define B_FS_IS_PERSISTENT FSSH_B_FS_IS_PERSISTENT 842 #define B_FS_IS_SHARED FSSH_B_FS_IS_SHARED 843 #define B_FS_HAS_MIME FSSH_B_FS_HAS_MIME 844 #define B_FS_HAS_ATTR FSSH_B_FS_HAS_ATTR 845 #define B_FS_HAS_QUERY FSSH_B_FS_HAS_QUERY 846 // those additions are preliminary and may be removed 847 #define B_FS_HAS_SELF_HEALING_LINKS FSSH_B_FS_HAS_SELF_HEALING_LINKS 848 #define B_FS_HAS_ALIASES FSSH_B_FS_HAS_ALIASES 849 #define B_FS_SUPPORTS_NODE_MONITORING FSSH_B_FS_SUPPORTS_NODE_MONITORING 850 851 #define fs_info fssh_fs_info 852 853 854 //////////////////////////////////////////////////////////////////////////////// 855 // #pragma mark - fssh_fs_interface.h 856 857 #define mount_id fssh_mount_id 858 #define vnode_id fssh_vnode_id 859 860 /* the file system's private data structures */ 861 #define fs_volume fssh_fs_volume 862 #define fs_cookie fssh_fs_cookie 863 #define fs_vnode fssh_fs_vnode 864 865 /* passed to write_stat() */ 866 #define write_stat_mask fssh_write_stat_mask 867 868 #define FS_WRITE_STAT_MODE FSSH_FS_WRITE_STAT_MODE 869 #define FS_WRITE_STAT_UID FSSH_FS_WRITE_STAT_UID 870 #define FS_WRITE_STAT_GID FSSH_FS_WRITE_STAT_GID 871 #define FS_WRITE_STAT_SIZE FSSH_FS_WRITE_STAT_SIZE 872 #define FS_WRITE_STAT_ATIME FSSH_FS_WRITE_STAT_ATIME 873 #define FS_WRITE_STAT_MTIME FSSH_FS_WRITE_STAT_MTIME 874 #define FS_WRITE_STAT_CRTIME FSSH_FS_WRITE_STAT_CRTIME 875 876 /* passed to write_fs_info() */ 877 #define FS_WRITE_FSINFO_NAME FSSH_FS_WRITE_FSINFO_NAME 878 879 #define file_io_vec fssh_file_io_vec 880 881 #define B_CURRENT_FS_API_VERSION FSSH_B_CURRENT_FS_API_VERSION 882 883 #define file_system_module_info fssh_file_system_module_info 884 885 886 /* file system add-ons only prototypes */ 887 #define new_vnode fssh_new_vnode 888 #define publish_vnode fssh_publish_vnode 889 #define get_vnode fssh_get_vnode 890 #define put_vnode fssh_put_vnode 891 #define remove_vnode fssh_remove_vnode 892 #define unremove_vnode fssh_unremove_vnode 893 #define get_vnode_removed fssh_get_vnode_removed 894 895 #define notify_entry_created fssh_notify_entry_created 896 #define notify_entry_removed fssh_notify_entry_removed 897 #define notify_entry_moved fssh_notify_entry_moved 898 #define notify_stat_changed fssh_notify_stat_changed 899 #define notify_attribute_changed fssh_notify_attribute_changed 900 901 #define notify_query_entry_created fssh_notify_query_entry_created 902 #define notify_query_entry_removed fssh_notify_query_entry_removed 903 904 905 //////////////////////////////////////////////////////////////////////////////// 906 // #pragma mark - fssh_fs_query.h 907 908 #define B_LIVE_QUERY FSSH_B_LIVE_QUERY 909 #define B_QUERY_NON_INDEXED FSSH_B_QUERY_NON_INDEXED 910 911 912 //////////////////////////////////////////////////////////////////////////////// 913 // #pragma mark - fssh_fs_volume.h 914 915 #define B_MOUNT_READ_ONLY FSSH_B_MOUNT_READ_ONLY 916 #define B_MOUNT_VIRTUAL_DEVICE FSSH_B_MOUNT_VIRTUAL_DEVICE 917 918 /* unmount flags */ 919 #define B_FORCE_UNMOUNT FSSH_B_FORCE_UNMOUNT 920 921 922 //////////////////////////////////////////////////////////////////////////////// 923 // #pragma mark - fssh_kernel_export.h 924 925 /* kernel threads */ 926 927 #define spawn_kernel_thread fssh_spawn_kernel_thread 928 929 /* primitive kernel debugging facilities */ 930 #define dprintf fssh_dprintf 931 #define kprintf fssh_kprintf 932 #define dump_block fssh_dump_block 933 #define panic fssh_panic 934 #define kernel_debugger fssh_kernel_debugger 935 #define parse_expression fssh_parse_expression 936 937 #define debugger_command_hook fssh_debugger_command_hook 938 #define add_debugger_command fssh_add_debugger_command 939 #define remove_debugger_command fssh_remove_debugger_command 940 941 942 //////////////////////////////////////////////////////////////////////////////// 943 // #pragma mark - fssh_module.h 944 945 #define module_info fssh_module_info 946 947 /* module standard operations */ 948 #define B_MODULE_INIT FSSH_B_MODULE_INIT 949 #define B_MODULE_UNINIT FSSH_B_MODULE_UNINIT 950 951 /* module flags */ 952 #define B_KEEP_LOADED FSSH_B_KEEP_LOADED 953 954 955 #define module_dependency fssh_module_dependency 956 957 958 //////////////////////////////////////////////////////////////////////////////// 959 // #pragma mark - fssh_node_monitor.h 960 961 #define B_STOP_WATCHING FSSH_B_STOP_WATCHING 962 #define B_WATCH_NAME FSSH_B_WATCH_NAME 963 #define B_WATCH_STAT FSSH_B_WATCH_STAT 964 #define B_WATCH_ATTR FSSH_B_WATCH_ATTR 965 #define B_WATCH_DIRECTORY FSSH_B_WATCH_DIRECTORY 966 #define B_WATCH_ALL FSSH_B_WATCH_ALL 967 #define B_WATCH_MOUNT FSSH_B_WATCH_MOUNT 968 969 #define B_ENTRY_CREATED FSSH_B_ENTRY_CREATED 970 #define B_ENTRY_REMOVED FSSH_B_ENTRY_REMOVED 971 #define B_ENTRY_MOVED FSSH_B_ENTRY_MOVED 972 #define B_STAT_CHANGED FSSH_B_STAT_CHANGED 973 #define B_ATTR_CHANGED FSSH_B_ATTR_CHANGED 974 #define B_DEVICE_MOUNTED FSSH_B_DEVICE_MOUNTED 975 #define B_DEVICE_UNMOUNTED FSSH_B_DEVICE_UNMOUNTED 976 977 #define B_ATTR_CREATED FSSH_B_ATTR_CREATED 978 #define B_ATTR_REMOVED FSSH_B_ATTR_REMOVED 979 980 #define B_STAT_MODE FSSH_B_STAT_MODE 981 #define B_STAT_UID FSSH_B_STAT_UID 982 #define B_STAT_GID FSSH_B_STAT_GID 983 #define B_STAT_SIZE FSSH_B_STAT_SIZE 984 #define B_STAT_ACCESS_TIME FSSH_B_STAT_ACCESS_TIME 985 #define B_STAT_MODIFICATION_TIME FSSH_B_STAT_MODIFICATION_TIME 986 #define B_STAT_CREATION_TIME FSSH_B_STAT_CREATION_TIME 987 #define B_STAT_CHANGE_TIME FSSH_B_STAT_CHANGE_TIME 988 989 990 //////////////////////////////////////////////////////////////////////////////// 991 // #pragma mark - fssh_os.h 992 993 /* System constants */ 994 995 #define B_OS_NAME_LENGTH FSSH_B_OS_NAME_LENGTH 996 #define B_PAGE_SIZE FSSH_B_PAGE_SIZE 997 #define B_INFINITE_TIMEOUT FSSH_B_INFINITE_TIMEOUT 998 999 1000 /* Types */ 1001 1002 #define area_id fssh_area_id 1003 #define port_id fssh_port_id 1004 #define sem_id fssh_sem_id 1005 #define team_id fssh_team_id 1006 #define thread_id fssh_thread_id 1007 1008 1009 /* Semaphores */ 1010 1011 #define sem_info fssh_sem_info 1012 1013 /* semaphore flags */ 1014 #define B_CAN_INTERRUPT FSSH_B_CAN_INTERRUPT 1015 #define B_CHECK_PERMISSION FSSH_B_CHECK_PERMISSION 1016 #define B_KILL_CAN_INTERRUPT FSSH_B_KILL_CAN_INTERRUPT 1017 1018 #define B_DO_NOT_RESCHEDULE FSSH_B_DO_NOT_RESCHEDULE 1019 #define B_RELEASE_ALL FSSH_B_RELEASE_ALL 1020 #define B_RELEASE_IF_WAITING_ONLY FSSH_B_RELEASE_IF_WAITING_ONLY 1021 1022 #define create_sem fssh_create_sem 1023 #define delete_sem fssh_delete_sem 1024 #define acquire_sem fssh_acquire_sem 1025 #define acquire_sem_etc fssh_acquire_sem_etc 1026 #define release_sem fssh_release_sem 1027 #define release_sem_etc fssh_release_sem_etc 1028 #define get_sem_count fssh_get_sem_count 1029 #define set_sem_owner fssh_set_sem_owner 1030 1031 #define get_sem_info(sem, info) fssh_get_sem_info(sem, info) 1032 #define get_next_sem_info(team, cookie, info) fssh_get_next_sem_info(team, cookie, info) 1033 1034 #define B_TIMEOUT FSSH_B_TIMEOUT 1035 #define B_RELATIVE_TIMEOUT FSSH_B_RELATIVE_TIMEOUT 1036 #define B_ABSOLUTE_TIMEOUT FSSH_B_ABSOLUTE_TIMEOUT 1037 1038 1039 /* Teams */ 1040 1041 #define B_CURRENT_TEAM FSSH_B_CURRENT_TEAM 1042 #define B_SYSTEM_TEAM FSSH_B_SYSTEM_TEAM 1043 1044 1045 /* Threads */ 1046 1047 #define B_THREAD_RUNNING FSSH_B_THREAD_RUNNING 1048 #define B_THREAD_READY FSSH_B_THREAD_READY 1049 #define B_THREAD_RECEIVING FSSH_B_THREAD_RECEIVING 1050 #define B_THREAD_ASLEEP FSSH_B_THREAD_ASLEEP 1051 #define B_THREAD_SUSPENDED FSSH_B_THREAD_SUSPENDED 1052 #define B_THREAD_WAITING FSSH_B_THREAD_WAITING 1053 1054 #define thread_state fssh_thread_state 1055 #define thread_info fssh_thread_info 1056 1057 #define B_IDLE_PRIORITY FSSH_B_IDLE_PRIORITY 1058 #define B_LOWEST_ACTIVE_PRIORITY FSSH_B_LOWEST_ACTIVE_PRIORITY 1059 #define B_LOW_PRIORITY FSSH_B_LOW_PRIORITY 1060 #define B_NORMAL_PRIORITY FSSH_B_NORMAL_PRIORITY 1061 #define B_DISPLAY_PRIORITY FSSH_B_DISPLAY_PRIORITY 1062 #define B_URGENT_DISPLAY_PRIORITY FSSH_B_URGENT_DISPLAY_PRIORITY 1063 #define B_REAL_TIME_DISPLAY_PRIORITY FSSH_B_REAL_TIME_DISPLAY_PRIORITY 1064 #define B_URGENT_PRIORITY FSSH_B_URGENT_PRIORITY 1065 #define B_REAL_TIME_PRIORITY FSSH_B_REAL_TIME_PRIORITY 1066 1067 #define B_FIRST_REAL_TIME_PRIORITY FSSH_B_FIRST_REAL_TIME_PRIORITY 1068 #define B_MIN_PRIORITY FSSH_B_MIN_PRIORITY 1069 #define B_MAX_PRIORITY FSSH_B_MAX_PRIORITY 1070 1071 #define B_SYSTEM_TIMEBASE FSSH_B_SYSTEM_TIMEBASE 1072 1073 #define thread_func fssh_thread_func 1074 #define thread_entry fssh_thread_entry 1075 1076 #define spawn_thread fssh_spawn_thread 1077 #define kill_thread fssh_kill_thread 1078 #define resume_thread fssh_resume_thread 1079 #define suspend_thread fssh_suspend_thread 1080 1081 #define rename_thread fssh_rename_thread 1082 #define set_thread_priority fssh_set_thread_priority 1083 #define exit_thread fssh_exit_thread 1084 #define wait_for_thread fssh_wait_for_thread 1085 #define on_exit_thread fssh_on_exit_thread 1086 1087 #define find_thread fssh_find_thread 1088 1089 #define send_data fssh_send_data 1090 #define receive_data fssh_receive_data 1091 #define has_data fssh_has_data 1092 1093 #define snooze fssh_snooze 1094 #define snooze_etc fssh_snooze_etc 1095 #define snooze_until fssh_snooze_until 1096 1097 #define get_thread_info(id, info) fssh_get_thread_info(id, info) 1098 #define get_next_thread_info(team, cookie, info) fssh_get_next_thread_info(team, cookie, info) 1099 1100 1101 /* Time */ 1102 1103 #define real_time_clock fssh_real_time_clock 1104 #define set_real_time_clock fssh_set_real_time_clock 1105 #define real_time_clock_usecs fssh_real_time_clock_usecs 1106 #define set_timezone fssh_set_timezone 1107 #define system_time fssh_system_time 1108 1109 1110 //////////////////////////////////////////////////////////////////////////////// 1111 // #pragma mark - fssh_stat.h 1112 1113 #define stat fssh_stat 1114 1115 // struct stat fields 1116 #undef st_dev 1117 #undef st_ino 1118 #undef st_mode 1119 #undef st_nlink 1120 #undef st_uid 1121 #undef st_gid 1122 #undef st_size 1123 #undef st_rdev 1124 #undef st_blksize 1125 #undef st_atime 1126 #undef st_mtime 1127 #undef st_ctime 1128 #undef st_crtime 1129 #undef st_type 1130 1131 #define st_dev fssh_st_dev 1132 #define st_ino fssh_st_ino 1133 #define st_mode fssh_st_mode 1134 #define st_nlink fssh_st_nlink 1135 #define st_uid fssh_st_uid 1136 #define st_gid fssh_st_gid 1137 #define st_size fssh_st_size 1138 #define st_rdev fssh_st_rdev 1139 #define st_blksize fssh_st_blksize 1140 #define st_atime fssh_st_atime 1141 #define st_mtime fssh_st_mtime 1142 #define st_ctime fssh_st_ctime 1143 #define st_crtime fssh_st_crtime 1144 #define st_type fssh_st_type 1145 1146 /* extended file types */ 1147 #define S_ATTR_DIR FSSH_S_ATTR_DIR 1148 #define S_ATTR FSSH_S_ATTR 1149 #define S_INDEX_DIR FSSH_S_INDEX_DIR 1150 #define S_STR_INDEX FSSH_S_STR_INDEX 1151 #define S_INT_INDEX FSSH_S_INT_INDEX 1152 #define S_UINT_INDEX FSSH_S_UINT_INDEX 1153 #define S_LONG_LONG_INDEX FSSH_S_LONG_LONG_INDEX 1154 #define S_ULONG_LONG_INDEX FSSH_S_ULONG_LONG_INDEX 1155 #define S_FLOAT_INDEX FSSH_S_FLOAT_INDEX 1156 #define S_DOUBLE_INDEX FSSH_S_DOUBLE_INDEX 1157 #define S_ALLOW_DUPS FSSH_S_ALLOW_DUPS 1158 1159 /* link types */ 1160 #define S_LINK_SELF_HEALING FSSH_S_LINK_SELF_HEALING 1161 #define S_LINK_AUTO_DELETE FSSH_S_LINK_AUTO_DELETE 1162 1163 /* standard file types */ 1164 #define S_IFMT FSSH_S_IFMT 1165 #define S_IFLNK FSSH_S_IFLNK 1166 #define S_IFREG FSSH_S_IFREG 1167 #define S_IFBLK FSSH_S_IFBLK 1168 #define S_IFDIR FSSH_S_IFDIR 1169 #define S_IFCHR FSSH_S_IFCHR 1170 #define S_IFIFO FSSH_S_IFIFO 1171 1172 #define S_ISREG(mode) FSSH_S_ISREG(mode) 1173 #define S_ISLNK(mode) FSSH_S_ISLNK(mode) 1174 #define S_ISBLK(mode) FSSH_S_ISBLK(mode) 1175 #define S_ISDIR(mode) FSSH_S_ISDIR(mode) 1176 #define S_ISCHR(mode) FSSH_S_ISCHR(mode) 1177 #define S_ISFIFO(mode) FSSH_S_ISFIFO(mode) 1178 #define S_ISINDEX(mode) FSSH_S_ISINDEX(mode) 1179 1180 #define S_IUMSK FSSH_S_IUMSK 1181 1182 #define S_ISUID FSSH_S_ISUID 1183 #define S_ISGID FSSH_S_ISGID 1184 1185 #define S_ISVTX FSSH_S_ISVTX 1186 1187 #define S_IRWXU FSSH_S_IRWXU 1188 #define S_IRUSR FSSH_S_IRUSR 1189 #define S_IWUSR FSSH_S_IWUSR 1190 #define S_IXUSR FSSH_S_IXUSR 1191 #define S_IRWXG FSSH_S_IRWXG 1192 #define S_IRGRP FSSH_S_IRGRP 1193 #define S_IWGRP FSSH_S_IWGRP 1194 #define S_IXGRP FSSH_S_IXGRP 1195 #define S_IRWXO FSSH_S_IRWXO 1196 #define S_IROTH FSSH_S_IROTH 1197 #define S_IWOTH FSSH_S_IWOTH 1198 #define S_IXOTH FSSH_S_IXOTH 1199 1200 #define ACCESSPERMS FSSH_ACCESSPERMS 1201 #define ALLPERMS FSSH_ALLPERMS 1202 #define DEFFILEMODE FSSH_DEFFILEMODE 1203 1204 #define chmod fssh_chmod 1205 #define fchmod fssh_fchmod 1206 #define mkdir fssh_mkdir 1207 #define mkfifo fssh_mkfifo 1208 #define umask fssh_umask 1209 1210 //#define stat fssh_stat 1211 // Already mapped above for "struct stat". 1212 #define fstat fssh_fstat 1213 #define lstat fssh_lstat 1214 1215 1216 //////////////////////////////////////////////////////////////////////////////// 1217 // #pragma mark - fssh_stdio.h 1218 1219 #define EOF FSSH_EOF 1220 1221 /* file operations */ 1222 #define remove fssh_remove 1223 #define rename fssh_rename 1224 1225 /* formatted I/O */ 1226 #define sprintf fssh_sprintf 1227 #define snprintf fssh_snprintf 1228 #define vsprintf fssh_vsprintf 1229 #define vsnprintf fssh_vsnprintf 1230 1231 #define sscanf fssh_sscanf 1232 #define vsscanf fssh_vsscanf 1233 1234 1235 //////////////////////////////////////////////////////////////////////////////// 1236 // #pragma mark - fssh_string.h 1237 1238 /* memXXX() functions */ 1239 #define memchr fssh_memchr 1240 #define memcmp fssh_memcmp 1241 #define memcpy fssh_memcpy 1242 #define memccpy fssh_memccpy 1243 #define memmove fssh_memmove 1244 #define memset fssh_memset 1245 1246 /* string functions */ 1247 #define strcpy fssh_strcpy 1248 #define strncpy fssh_strncpy 1249 #define strcat fssh_strcat 1250 #define strncat fssh_strncat 1251 #define strlen fssh_strlen 1252 #define strcmp fssh_strcmp 1253 #define strncmp fssh_strncmp 1254 #define strchr fssh_strchr 1255 #define strrchr fssh_strrchr 1256 #define strstr fssh_strstr 1257 #define strchrnul fssh_strchrnul 1258 #define strpbrk fssh_strpbrk 1259 #define strtok fssh_strtok 1260 #define strtok_r fssh_strtok_r 1261 #define strspn fssh_strspn 1262 #define strcspn fssh_strcspn 1263 #define strcoll fssh_strcoll 1264 #define strxfrm fssh_strxfrm 1265 #define strerror fssh_strerror 1266 #define strerror_r fssh_strerror_r 1267 1268 /* non-standard string functions */ 1269 #define strcasecmp fssh_strcasecmp 1270 #define strncasecmp fssh_strncasecmp 1271 #define strcasestr fssh_strcasestr 1272 #define strdup fssh_strdup 1273 #define stpcpy fssh_stpcpy 1274 #define strtcopy fssh_strtcopy 1275 #define strlcat fssh_strlcat 1276 #define strlcpy fssh_strlcpy 1277 #define strnlen fssh_strnlen 1278 1279 #define ffs fssh_ffs 1280 #define index fssh_index 1281 #define rindex fssh_rindex 1282 1283 1284 //////////////////////////////////////////////////////////////////////////////// 1285 // #pragma mark - fssh_time.h 1286 1287 #define clock_t fssh_clock_t 1288 #define time_t fssh_time_t 1289 #define suseconds_t fssh_suseconds_t 1290 #define useconds_t fssh_useconds_t 1291 1292 #undef CLOCKS_PER_SEC 1293 #undef CLK_TCK 1294 #undef MAX_TIMESTR 1295 1296 #define CLOCKS_PER_SEC FSSH_CLOCKS_PER_SEC 1297 #define CLK_TCK FSSH_CLK_TCK 1298 #define MAX_TIMESTR FSSH_MAX_TIMESTR 1299 1300 #define timespec fssh_timespec 1301 #define itimerspec fssh_itimerspec 1302 #define tm fssh_tm 1303 1304 /* special timezone support */ 1305 #define tzname fssh_tzname 1306 #define daylight fssh_daylight 1307 #define timezone fssh_timezone 1308 1309 #define clock fssh_clock 1310 #define difftime fssh_difftime 1311 #define mktime fssh_mktime 1312 #define time fssh_time 1313 #define asctime fssh_asctime 1314 #define asctime_r fssh_asctime_r 1315 #define ctime fssh_ctime 1316 #define ctime_r fssh_ctime_r 1317 #define gmtime fssh_gmtime 1318 #define gmtime_r fssh_gmtime_r 1319 #define localtime fssh_localtime 1320 #define localtime_r fssh_localtime_r 1321 #define strftime fssh_strftime 1322 #define strptime fssh_strptime 1323 1324 /* special timezone support */ 1325 #define tzset fssh_tzset 1326 #define stime fssh_stime 1327 1328 1329 //////////////////////////////////////////////////////////////////////////////// 1330 // #pragma mark - fssh_type_constants.h 1331 1332 #define B_ANY_TYPE FSSH_B_ANY_TYPE 1333 #define B_ATOM_TYPE FSSH_B_ATOM_TYPE 1334 #define B_ATOMREF_TYPE FSSH_B_ATOMREF_TYPE 1335 #define B_BOOL_TYPE FSSH_B_BOOL_TYPE 1336 #define B_CHAR_TYPE FSSH_B_CHAR_TYPE 1337 #define B_COLOR_8_BIT_TYPE FSSH_B_COLOR_8_BIT_TYPE 1338 #define B_DOUBLE_TYPE FSSH_B_DOUBLE_TYPE 1339 #define B_FLOAT_TYPE FSSH_B_FLOAT_TYPE 1340 #define B_GRAYSCALE_8_BIT_TYPE FSSH_B_GRAYSCALE_8_BIT_TYPE 1341 #define B_INT16_TYPE FSSH_B_INT16_TYPE 1342 #define B_INT32_TYPE FSSH_B_INT32_TYPE 1343 #define B_INT64_TYPE FSSH_B_INT64_TYPE 1344 #define B_INT8_TYPE FSSH_B_INT8_TYPE 1345 #define B_LARGE_ICON_TYPE FSSH_B_LARGE_ICON_TYPE 1346 #define B_MEDIA_PARAMETER_GROUP_TYPE FSSH_B_MEDIA_PARAMETER_GROUP_TYPE 1347 #define B_MEDIA_PARAMETER_TYPE FSSH_B_MEDIA_PARAMETER_TYPE 1348 #define B_MEDIA_PARAMETER_WEB_TYPE FSSH_B_MEDIA_PARAMETER_WEB_TYPE 1349 #define B_MESSAGE_TYPE FSSH_B_MESSAGE_TYPE 1350 #define B_MESSENGER_TYPE FSSH_B_MESSENGER_TYPE 1351 #define B_MIME_TYPE FSSH_B_MIME_TYPE 1352 #define B_MINI_ICON_TYPE FSSH_B_MINI_ICON_TYPE 1353 #define B_MONOCHROME_1_BIT_TYPE FSSH_B_MONOCHROME_1_BIT_TYPE 1354 #define B_OBJECT_TYPE FSSH_B_OBJECT_TYPE 1355 #define B_OFF_T_TYPE FSSH_B_OFF_T_TYPE 1356 #define B_PATTERN_TYPE FSSH_B_PATTERN_TYPE 1357 #define B_POINTER_TYPE FSSH_B_POINTER_TYPE 1358 #define B_POINT_TYPE FSSH_B_POINT_TYPE 1359 #define B_PROPERTY_INFO_TYPE FSSH_B_PROPERTY_INFO_TYPE 1360 #define B_RAW_TYPE FSSH_B_RAW_TYPE 1361 #define B_RECT_TYPE FSSH_B_RECT_TYPE 1362 #define B_REF_TYPE FSSH_B_REF_TYPE 1363 #define B_RGB_32_BIT_TYPE FSSH_B_RGB_32_BIT_TYPE 1364 #define B_RGB_COLOR_TYPE FSSH_B_RGB_COLOR_TYPE 1365 #define B_SIZE_T_TYPE FSSH_B_SIZE_T_TYPE 1366 #define B_SSIZE_T_TYPE FSSH_B_SSIZE_T_TYPE 1367 #define B_STRING_TYPE FSSH_B_STRING_TYPE 1368 #define B_TIME_TYPE FSSH_B_TIME_TYPE 1369 #define B_UINT16_TYPE FSSH_B_UINT16_TYPE 1370 #define B_UINT32_TYPE FSSH_B_UINT32_TYPE 1371 #define B_UINT64_TYPE FSSH_B_UINT64_TYPE 1372 #define B_UINT8_TYPE FSSH_B_UINT8_TYPE 1373 #define B_VECTOR_ICON_TYPE FSSH_B_VECTOR_ICON_TYPE 1374 #define B_ASCII_TYPE FSSH_B_ASCII_TYPE 1375 1376 //----- System-wide MIME types for handling URL's ------------------------------ 1377 1378 #define B_URL_HTTP FSSH_B_URL_HTTP 1379 #define B_URL_HTTPS FSSH_B_URL_HTTPS 1380 #define B_URL_FTP FSSH_B_URL_FTP 1381 #define B_URL_GOPHER FSSH_B_URL_GOPHER 1382 #define B_URL_MAILTO FSSH_B_URL_MAILTO 1383 #define B_URL_NEWS FSSH_B_URL_NEWS 1384 #define B_URL_NNTP FSSH_B_URL_NNTP 1385 #define B_URL_TELNET FSSH_B_URL_TELNET 1386 #define B_URL_RLOGIN FSSH_B_URL_RLOGIN 1387 #define B_URL_TN3270 FSSH_B_URL_TN3270 1388 #define B_URL_WAIS FSSH_B_URL_WAIS 1389 #define B_URL_FILE FSSH_B_URL_FILE 1390 1391 1392 //////////////////////////////////////////////////////////////////////////////// 1393 // #pragma mark - fssh_types.h 1394 1395 #define ulong fssh_ulong 1396 1397 #define addr_t fssh_addr_t 1398 1399 #define dev_t fssh_dev_t 1400 #define ino_t fssh_ino_t 1401 1402 #define size_t fssh_size_t 1403 #define ssize_t fssh_ssize_t 1404 #define off_t fssh_off_t 1405 1406 #define bigtime_t fssh_bigtime_t 1407 1408 #define status_t fssh_status_t 1409 #define type_code fssh_type_code 1410 1411 #define mode_t fssh_mode_t 1412 #define nlink_t fssh_nlink_t 1413 #define uid_t fssh_uid_t 1414 #define gid_t fssh_gid_t 1415 #define pid_t fssh_pid_t 1416 1417 1418 //////////////////////////////////////////////////////////////////////////////// 1419 // #pragma mark - fssh_uio.h 1420 1421 #define iovec fssh_iovec 1422 1423 #define readv fssh_readv 1424 #define readv_pos fssh_readv_pos 1425 #define writev fssh_writev 1426 #define writev_pos fssh_writev_pos 1427 1428 1429 //////////////////////////////////////////////////////////////////////////////// 1430 // #pragma mark - fssh_unistd.h 1431 1432 /* access modes */ 1433 #define R_OK FSSH_R_OK 1434 #define W_OK FSSH_W_OK 1435 #define X_OK FSSH_X_OK 1436 #define F_OK FSSH_F_OK 1437 1438 /* standard file descriptors */ 1439 #define STDIN_FILENO FSSH_STDIN_FILENO 1440 #define STDOUT_FILENO FSSH_STDOUT_FILENO 1441 #define STDERR_FILENO FSSH_STDERR_FILENO 1442 1443 /* lseek() constants */ 1444 #define SEEK_SET FSSH_SEEK_SET 1445 #define SEEK_CUR FSSH_SEEK_CUR 1446 #define SEEK_END FSSH_SEEK_END 1447 1448 /* file functions */ 1449 #define access fssh_access 1450 1451 #define chdir fssh_chdir 1452 #define fchdir fssh_fchdir 1453 #define getcwd fssh_getcwd 1454 1455 #define dup fssh_dup 1456 #define dup2 fssh_dup2 1457 #define close fssh_close 1458 #define link fssh_link 1459 #define unlink fssh_unlink 1460 #define rmdir fssh_rmdir 1461 1462 #define readlink fssh_readlink 1463 #define symlink fssh_symlink 1464 1465 #define ftruncate fssh_ftruncate 1466 #define truncate fssh_truncate 1467 #define ioctl fssh_ioctl 1468 1469 #define read fssh_read 1470 #define read_pos fssh_read_pos 1471 #define pread fssh_pread 1472 #define write fssh_write 1473 #define write_pos fssh_write_pos 1474 #define pwrite fssh_pwrite 1475 #define lseek fssh_lseek 1476 1477 #define sync fssh_sync 1478 #define fsync fssh_fsync 1479 1480 /* access permissions */ 1481 #define getegid fssh_getegid 1482 #define geteuid fssh_geteuid 1483 #define getgid fssh_getgid 1484 #define getgroups fssh_getgroups 1485 #define getuid fssh_getuid 1486 1487 1488 //////////////////////////////////////////////////////////////////////////////// 1489 // int types 1490 1491 #define int8 int8_t 1492 #define uint8 uint8_t 1493 #define int16 int16_t 1494 #define uint16 uint16_t 1495 #define int32 int32_t 1496 #define uint32 uint32_t 1497 #define int64 int64_t 1498 #define uint64 uint64_t 1499 1500 #define vint32 vint32_t 1501 1502 1503 #endif // _FSSH_API_WRAPPER_H 1504