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 #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_notification_hook fssh_transaction_notification_hook 791 792 /* transactions */ 793 #define cache_start_transaction fssh_cache_start_transaction 794 #define cache_sync_transaction fssh_cache_sync_transaction 795 #define cache_end_transaction fssh_cache_end_transaction 796 #define cache_abort_transaction fssh_cache_abort_transaction 797 #define cache_detach_sub_transaction fssh_cache_detach_sub_transaction 798 #define cache_abort_sub_transaction fssh_cache_abort_sub_transaction 799 #define cache_start_sub_transaction fssh_cache_start_sub_transaction 800 #define cache_next_block_in_transaction fssh_cache_next_block_in_transaction 801 #define cache_blocks_in_transaction fssh_cache_blocks_in_transaction 802 #define cache_blocks_in_sub_transaction fssh_cache_blocks_in_sub_transaction 803 804 /* block cache */ 805 #define block_cache_delete fssh_block_cache_delete 806 #define block_cache_create fssh_block_cache_create 807 #define block_cache_sync fssh_block_cache_sync 808 #define block_cache_sync_etc fssh_block_cache_sync_etc 809 #define block_cache_make_writable fssh_block_cache_make_writable 810 #define block_cache_get_writable_etc fssh_block_cache_get_writable_etc 811 #define block_cache_get_writable fssh_block_cache_get_writable 812 #define block_cache_get_empty fssh_block_cache_get_empty 813 #define block_cache_get_etc fssh_block_cache_get_etc 814 #define block_cache_get fssh_block_cache_get 815 #define block_cache_set_dirty fssh_block_cache_set_dirty 816 #define block_cache_put fssh_block_cache_put 817 818 /* file cache */ 819 #define file_cache_create fssh_file_cache_create 820 #define file_cache_delete fssh_file_cache_delete 821 #define file_cache_set_size fssh_file_cache_set_size 822 #define file_cache_sync fssh_file_cache_sync 823 #define file_cache_invalidate_file_map fssh_file_cache_invalidate_file_map 824 825 #define file_cache_read_pages fssh_file_cache_read_pages 826 #define file_cache_write_pages fssh_file_cache_write_pages 827 #define file_cache_read fssh_file_cache_read 828 #define file_cache_write fssh_file_cache_write 829 830 831 //////////////////////////////////////////////////////////////////////////////// 832 // #pragma mark - fssh_fs_index.h 833 834 #define index_info fssh_index_info 835 836 837 //////////////////////////////////////////////////////////////////////////////// 838 // #pragma mark - fssh_fs_info.h 839 840 /* fs_info.flags */ 841 #define B_FS_IS_READONLY FSSH_B_FS_IS_READONLY 842 #define B_FS_IS_REMOVABLE FSSH_B_FS_IS_REMOVABLE 843 #define B_FS_IS_PERSISTENT FSSH_B_FS_IS_PERSISTENT 844 #define B_FS_IS_SHARED FSSH_B_FS_IS_SHARED 845 #define B_FS_HAS_MIME FSSH_B_FS_HAS_MIME 846 #define B_FS_HAS_ATTR FSSH_B_FS_HAS_ATTR 847 #define B_FS_HAS_QUERY FSSH_B_FS_HAS_QUERY 848 // those additions are preliminary and may be removed 849 #define B_FS_HAS_SELF_HEALING_LINKS FSSH_B_FS_HAS_SELF_HEALING_LINKS 850 #define B_FS_HAS_ALIASES FSSH_B_FS_HAS_ALIASES 851 #define B_FS_SUPPORTS_NODE_MONITORING FSSH_B_FS_SUPPORTS_NODE_MONITORING 852 853 #define fs_info fssh_fs_info 854 855 856 //////////////////////////////////////////////////////////////////////////////// 857 // #pragma mark - fssh_fs_interface.h 858 859 #define mount_id fssh_mount_id 860 #define vnode_id fssh_vnode_id 861 862 /* the file system's private data structures */ 863 #define fs_volume fssh_fs_volume 864 #define fs_cookie fssh_fs_cookie 865 #define fs_vnode fssh_fs_vnode 866 867 /* passed to write_stat() */ 868 #define write_stat_mask fssh_write_stat_mask 869 870 #define FS_WRITE_STAT_MODE FSSH_FS_WRITE_STAT_MODE 871 #define FS_WRITE_STAT_UID FSSH_FS_WRITE_STAT_UID 872 #define FS_WRITE_STAT_GID FSSH_FS_WRITE_STAT_GID 873 #define FS_WRITE_STAT_SIZE FSSH_FS_WRITE_STAT_SIZE 874 #define FS_WRITE_STAT_ATIME FSSH_FS_WRITE_STAT_ATIME 875 #define FS_WRITE_STAT_MTIME FSSH_FS_WRITE_STAT_MTIME 876 #define FS_WRITE_STAT_CRTIME FSSH_FS_WRITE_STAT_CRTIME 877 878 /* passed to write_fs_info() */ 879 #define FS_WRITE_FSINFO_NAME FSSH_FS_WRITE_FSINFO_NAME 880 881 #define file_io_vec fssh_file_io_vec 882 883 #define B_CURRENT_FS_API_VERSION FSSH_B_CURRENT_FS_API_VERSION 884 885 #define file_system_module_info fssh_file_system_module_info 886 887 888 /* file system add-ons only prototypes */ 889 #define new_vnode fssh_new_vnode 890 #define publish_vnode fssh_publish_vnode 891 #define get_vnode fssh_get_vnode 892 #define put_vnode fssh_put_vnode 893 #define remove_vnode fssh_remove_vnode 894 #define unremove_vnode fssh_unremove_vnode 895 #define get_vnode_removed fssh_get_vnode_removed 896 897 #define notify_entry_created fssh_notify_entry_created 898 #define notify_entry_removed fssh_notify_entry_removed 899 #define notify_entry_moved fssh_notify_entry_moved 900 #define notify_stat_changed fssh_notify_stat_changed 901 #define notify_attribute_changed fssh_notify_attribute_changed 902 903 #define notify_query_entry_created fssh_notify_query_entry_created 904 #define notify_query_entry_removed fssh_notify_query_entry_removed 905 906 907 //////////////////////////////////////////////////////////////////////////////// 908 // #pragma mark - fssh_fs_query.h 909 910 #define B_LIVE_QUERY FSSH_B_LIVE_QUERY 911 #define B_QUERY_NON_INDEXED FSSH_B_QUERY_NON_INDEXED 912 913 914 //////////////////////////////////////////////////////////////////////////////// 915 // #pragma mark - fssh_fs_volume.h 916 917 #define B_MOUNT_READ_ONLY FSSH_B_MOUNT_READ_ONLY 918 #define B_MOUNT_VIRTUAL_DEVICE FSSH_B_MOUNT_VIRTUAL_DEVICE 919 920 /* unmount flags */ 921 #define B_FORCE_UNMOUNT FSSH_B_FORCE_UNMOUNT 922 923 924 //////////////////////////////////////////////////////////////////////////////// 925 // #pragma mark - fssh_kernel_export.h 926 927 /* kernel threads */ 928 929 #define spawn_kernel_thread fssh_spawn_kernel_thread 930 931 /* primitive kernel debugging facilities */ 932 #define dprintf fssh_dprintf 933 #define kprintf fssh_kprintf 934 #define dump_block fssh_dump_block 935 #define panic fssh_panic 936 #define kernel_debugger fssh_kernel_debugger 937 #define parse_expression fssh_parse_expression 938 939 #define debugger_command_hook fssh_debugger_command_hook 940 #define add_debugger_command fssh_add_debugger_command 941 #define remove_debugger_command fssh_remove_debugger_command 942 943 944 //////////////////////////////////////////////////////////////////////////////// 945 // #pragma mark - fssh_module.h 946 947 #define module_info fssh_module_info 948 949 /* module standard operations */ 950 #define B_MODULE_INIT FSSH_B_MODULE_INIT 951 #define B_MODULE_UNINIT FSSH_B_MODULE_UNINIT 952 953 /* module flags */ 954 #define B_KEEP_LOADED FSSH_B_KEEP_LOADED 955 956 957 #define module_dependency fssh_module_dependency 958 959 960 //////////////////////////////////////////////////////////////////////////////// 961 // #pragma mark - fssh_node_monitor.h 962 963 #define B_STOP_WATCHING FSSH_B_STOP_WATCHING 964 #define B_WATCH_NAME FSSH_B_WATCH_NAME 965 #define B_WATCH_STAT FSSH_B_WATCH_STAT 966 #define B_WATCH_ATTR FSSH_B_WATCH_ATTR 967 #define B_WATCH_DIRECTORY FSSH_B_WATCH_DIRECTORY 968 #define B_WATCH_ALL FSSH_B_WATCH_ALL 969 #define B_WATCH_MOUNT FSSH_B_WATCH_MOUNT 970 971 #define B_ENTRY_CREATED FSSH_B_ENTRY_CREATED 972 #define B_ENTRY_REMOVED FSSH_B_ENTRY_REMOVED 973 #define B_ENTRY_MOVED FSSH_B_ENTRY_MOVED 974 #define B_STAT_CHANGED FSSH_B_STAT_CHANGED 975 #define B_ATTR_CHANGED FSSH_B_ATTR_CHANGED 976 #define B_DEVICE_MOUNTED FSSH_B_DEVICE_MOUNTED 977 #define B_DEVICE_UNMOUNTED FSSH_B_DEVICE_UNMOUNTED 978 979 #define B_ATTR_CREATED FSSH_B_ATTR_CREATED 980 #define B_ATTR_REMOVED FSSH_B_ATTR_REMOVED 981 982 #define B_STAT_MODE FSSH_B_STAT_MODE 983 #define B_STAT_UID FSSH_B_STAT_UID 984 #define B_STAT_GID FSSH_B_STAT_GID 985 #define B_STAT_SIZE FSSH_B_STAT_SIZE 986 #define B_STAT_ACCESS_TIME FSSH_B_STAT_ACCESS_TIME 987 #define B_STAT_MODIFICATION_TIME FSSH_B_STAT_MODIFICATION_TIME 988 #define B_STAT_CREATION_TIME FSSH_B_STAT_CREATION_TIME 989 #define B_STAT_CHANGE_TIME FSSH_B_STAT_CHANGE_TIME 990 991 992 //////////////////////////////////////////////////////////////////////////////// 993 // #pragma mark - fssh_os.h 994 995 /* System constants */ 996 997 #define B_OS_NAME_LENGTH FSSH_B_OS_NAME_LENGTH 998 #define B_PAGE_SIZE FSSH_B_PAGE_SIZE 999 #define B_INFINITE_TIMEOUT FSSH_B_INFINITE_TIMEOUT 1000 1001 1002 /* Types */ 1003 1004 #define area_id fssh_area_id 1005 #define port_id fssh_port_id 1006 #define sem_id fssh_sem_id 1007 #define team_id fssh_team_id 1008 #define thread_id fssh_thread_id 1009 1010 1011 /* Semaphores */ 1012 1013 #define sem_info fssh_sem_info 1014 1015 /* semaphore flags */ 1016 #define B_CAN_INTERRUPT FSSH_B_CAN_INTERRUPT 1017 #define B_CHECK_PERMISSION FSSH_B_CHECK_PERMISSION 1018 #define B_KILL_CAN_INTERRUPT FSSH_B_KILL_CAN_INTERRUPT 1019 1020 #define B_DO_NOT_RESCHEDULE FSSH_B_DO_NOT_RESCHEDULE 1021 #define B_RELEASE_ALL FSSH_B_RELEASE_ALL 1022 #define B_RELEASE_IF_WAITING_ONLY FSSH_B_RELEASE_IF_WAITING_ONLY 1023 1024 #define create_sem fssh_create_sem 1025 #define delete_sem fssh_delete_sem 1026 #define acquire_sem fssh_acquire_sem 1027 #define acquire_sem_etc fssh_acquire_sem_etc 1028 #define release_sem fssh_release_sem 1029 #define release_sem_etc fssh_release_sem_etc 1030 #define get_sem_count fssh_get_sem_count 1031 #define set_sem_owner fssh_set_sem_owner 1032 1033 #define get_sem_info(sem, info) fssh_get_sem_info(sem, info) 1034 #define get_next_sem_info(team, cookie, info) fssh_get_next_sem_info(team, cookie, info) 1035 1036 #define B_TIMEOUT FSSH_B_TIMEOUT 1037 #define B_RELATIVE_TIMEOUT FSSH_B_RELATIVE_TIMEOUT 1038 #define B_ABSOLUTE_TIMEOUT FSSH_B_ABSOLUTE_TIMEOUT 1039 1040 1041 /* Teams */ 1042 1043 #define B_CURRENT_TEAM FSSH_B_CURRENT_TEAM 1044 #define B_SYSTEM_TEAM FSSH_B_SYSTEM_TEAM 1045 1046 1047 /* Threads */ 1048 1049 #define B_THREAD_RUNNING FSSH_B_THREAD_RUNNING 1050 #define B_THREAD_READY FSSH_B_THREAD_READY 1051 #define B_THREAD_RECEIVING FSSH_B_THREAD_RECEIVING 1052 #define B_THREAD_ASLEEP FSSH_B_THREAD_ASLEEP 1053 #define B_THREAD_SUSPENDED FSSH_B_THREAD_SUSPENDED 1054 #define B_THREAD_WAITING FSSH_B_THREAD_WAITING 1055 1056 #define thread_state fssh_thread_state 1057 #define thread_info fssh_thread_info 1058 1059 #define B_IDLE_PRIORITY FSSH_B_IDLE_PRIORITY 1060 #define B_LOWEST_ACTIVE_PRIORITY FSSH_B_LOWEST_ACTIVE_PRIORITY 1061 #define B_LOW_PRIORITY FSSH_B_LOW_PRIORITY 1062 #define B_NORMAL_PRIORITY FSSH_B_NORMAL_PRIORITY 1063 #define B_DISPLAY_PRIORITY FSSH_B_DISPLAY_PRIORITY 1064 #define B_URGENT_DISPLAY_PRIORITY FSSH_B_URGENT_DISPLAY_PRIORITY 1065 #define B_REAL_TIME_DISPLAY_PRIORITY FSSH_B_REAL_TIME_DISPLAY_PRIORITY 1066 #define B_URGENT_PRIORITY FSSH_B_URGENT_PRIORITY 1067 #define B_REAL_TIME_PRIORITY FSSH_B_REAL_TIME_PRIORITY 1068 1069 #define B_FIRST_REAL_TIME_PRIORITY FSSH_B_FIRST_REAL_TIME_PRIORITY 1070 #define B_MIN_PRIORITY FSSH_B_MIN_PRIORITY 1071 #define B_MAX_PRIORITY FSSH_B_MAX_PRIORITY 1072 1073 #define B_SYSTEM_TIMEBASE FSSH_B_SYSTEM_TIMEBASE 1074 1075 #define thread_func fssh_thread_func 1076 #define thread_entry fssh_thread_entry 1077 1078 #define spawn_thread fssh_spawn_thread 1079 #define kill_thread fssh_kill_thread 1080 #define resume_thread fssh_resume_thread 1081 #define suspend_thread fssh_suspend_thread 1082 1083 #define rename_thread fssh_rename_thread 1084 #define set_thread_priority fssh_set_thread_priority 1085 #define exit_thread fssh_exit_thread 1086 #define wait_for_thread fssh_wait_for_thread 1087 #define on_exit_thread fssh_on_exit_thread 1088 1089 #define find_thread fssh_find_thread 1090 1091 #define send_data fssh_send_data 1092 #define receive_data fssh_receive_data 1093 #define has_data fssh_has_data 1094 1095 #define snooze fssh_snooze 1096 #define snooze_etc fssh_snooze_etc 1097 #define snooze_until fssh_snooze_until 1098 1099 #define get_thread_info(id, info) fssh_get_thread_info(id, info) 1100 #define get_next_thread_info(team, cookie, info) fssh_get_next_thread_info(team, cookie, info) 1101 1102 1103 /* Time */ 1104 1105 #define real_time_clock fssh_real_time_clock 1106 #define set_real_time_clock fssh_set_real_time_clock 1107 #define real_time_clock_usecs fssh_real_time_clock_usecs 1108 #define set_timezone fssh_set_timezone 1109 #define system_time fssh_system_time 1110 1111 1112 //////////////////////////////////////////////////////////////////////////////// 1113 // #pragma mark - fssh_stat.h 1114 1115 #define stat fssh_stat 1116 1117 // struct stat fields 1118 #undef st_dev 1119 #undef st_ino 1120 #undef st_mode 1121 #undef st_nlink 1122 #undef st_uid 1123 #undef st_gid 1124 #undef st_size 1125 #undef st_rdev 1126 #undef st_blksize 1127 #undef st_atime 1128 #undef st_mtime 1129 #undef st_ctime 1130 #undef st_crtime 1131 #undef st_type 1132 1133 #define st_dev fssh_st_dev 1134 #define st_ino fssh_st_ino 1135 #define st_mode fssh_st_mode 1136 #define st_nlink fssh_st_nlink 1137 #define st_uid fssh_st_uid 1138 #define st_gid fssh_st_gid 1139 #define st_size fssh_st_size 1140 #define st_rdev fssh_st_rdev 1141 #define st_blksize fssh_st_blksize 1142 #define st_atime fssh_st_atime 1143 #define st_mtime fssh_st_mtime 1144 #define st_ctime fssh_st_ctime 1145 #define st_crtime fssh_st_crtime 1146 #define st_type fssh_st_type 1147 1148 /* extended file types */ 1149 #define S_ATTR_DIR FSSH_S_ATTR_DIR 1150 #define S_ATTR FSSH_S_ATTR 1151 #define S_INDEX_DIR FSSH_S_INDEX_DIR 1152 #define S_STR_INDEX FSSH_S_STR_INDEX 1153 #define S_INT_INDEX FSSH_S_INT_INDEX 1154 #define S_UINT_INDEX FSSH_S_UINT_INDEX 1155 #define S_LONG_LONG_INDEX FSSH_S_LONG_LONG_INDEX 1156 #define S_ULONG_LONG_INDEX FSSH_S_ULONG_LONG_INDEX 1157 #define S_FLOAT_INDEX FSSH_S_FLOAT_INDEX 1158 #define S_DOUBLE_INDEX FSSH_S_DOUBLE_INDEX 1159 #define S_ALLOW_DUPS FSSH_S_ALLOW_DUPS 1160 1161 /* link types */ 1162 #define S_LINK_SELF_HEALING FSSH_S_LINK_SELF_HEALING 1163 #define S_LINK_AUTO_DELETE FSSH_S_LINK_AUTO_DELETE 1164 1165 /* standard file types */ 1166 #define S_IFMT FSSH_S_IFMT 1167 #define S_IFLNK FSSH_S_IFLNK 1168 #define S_IFREG FSSH_S_IFREG 1169 #define S_IFBLK FSSH_S_IFBLK 1170 #define S_IFDIR FSSH_S_IFDIR 1171 #define S_IFCHR FSSH_S_IFCHR 1172 #define S_IFIFO FSSH_S_IFIFO 1173 1174 #define S_ISREG(mode) FSSH_S_ISREG(mode) 1175 #define S_ISLNK(mode) FSSH_S_ISLNK(mode) 1176 #define S_ISBLK(mode) FSSH_S_ISBLK(mode) 1177 #define S_ISDIR(mode) FSSH_S_ISDIR(mode) 1178 #define S_ISCHR(mode) FSSH_S_ISCHR(mode) 1179 #define S_ISFIFO(mode) FSSH_S_ISFIFO(mode) 1180 #define S_ISINDEX(mode) FSSH_S_ISINDEX(mode) 1181 1182 #define S_IUMSK FSSH_S_IUMSK 1183 1184 #define S_ISUID FSSH_S_ISUID 1185 #define S_ISGID FSSH_S_ISGID 1186 1187 #define S_ISVTX FSSH_S_ISVTX 1188 1189 #define S_IRWXU FSSH_S_IRWXU 1190 #define S_IRUSR FSSH_S_IRUSR 1191 #define S_IWUSR FSSH_S_IWUSR 1192 #define S_IXUSR FSSH_S_IXUSR 1193 #define S_IRWXG FSSH_S_IRWXG 1194 #define S_IRGRP FSSH_S_IRGRP 1195 #define S_IWGRP FSSH_S_IWGRP 1196 #define S_IXGRP FSSH_S_IXGRP 1197 #define S_IRWXO FSSH_S_IRWXO 1198 #define S_IROTH FSSH_S_IROTH 1199 #define S_IWOTH FSSH_S_IWOTH 1200 #define S_IXOTH FSSH_S_IXOTH 1201 1202 #define ACCESSPERMS FSSH_ACCESSPERMS 1203 #define ALLPERMS FSSH_ALLPERMS 1204 #define DEFFILEMODE FSSH_DEFFILEMODE 1205 1206 #define chmod fssh_chmod 1207 #define fchmod fssh_fchmod 1208 #define mkdir fssh_mkdir 1209 #define mkfifo fssh_mkfifo 1210 #define umask fssh_umask 1211 1212 //#define stat fssh_stat 1213 // Already mapped above for "struct stat". 1214 #define fstat fssh_fstat 1215 #define lstat fssh_lstat 1216 1217 1218 //////////////////////////////////////////////////////////////////////////////// 1219 // #pragma mark - fssh_stdio.h 1220 1221 #define EOF FSSH_EOF 1222 1223 /* file operations */ 1224 #define remove fssh_remove 1225 #define rename fssh_rename 1226 1227 /* formatted I/O */ 1228 #define sprintf fssh_sprintf 1229 #define snprintf fssh_snprintf 1230 #define vsprintf fssh_vsprintf 1231 #define vsnprintf fssh_vsnprintf 1232 1233 #define sscanf fssh_sscanf 1234 #define vsscanf fssh_vsscanf 1235 1236 1237 //////////////////////////////////////////////////////////////////////////////// 1238 // #pragma mark - fssh_string.h 1239 1240 /* memXXX() functions */ 1241 #define memchr fssh_memchr 1242 #define memcmp fssh_memcmp 1243 #define memcpy fssh_memcpy 1244 #define memccpy fssh_memccpy 1245 #define memmove fssh_memmove 1246 #define memset fssh_memset 1247 1248 /* string functions */ 1249 #define strcpy fssh_strcpy 1250 #define strncpy fssh_strncpy 1251 #define strcat fssh_strcat 1252 #define strncat fssh_strncat 1253 #define strlen fssh_strlen 1254 #define strcmp fssh_strcmp 1255 #define strncmp fssh_strncmp 1256 #define strchr fssh_strchr 1257 #define strrchr fssh_strrchr 1258 #define strstr fssh_strstr 1259 #define strchrnul fssh_strchrnul 1260 #define strpbrk fssh_strpbrk 1261 #define strtok fssh_strtok 1262 #define strtok_r fssh_strtok_r 1263 #define strspn fssh_strspn 1264 #define strcspn fssh_strcspn 1265 #define strcoll fssh_strcoll 1266 #define strxfrm fssh_strxfrm 1267 #define strerror fssh_strerror 1268 #define strerror_r fssh_strerror_r 1269 1270 /* non-standard string functions */ 1271 #define strcasecmp fssh_strcasecmp 1272 #define strncasecmp fssh_strncasecmp 1273 #define strcasestr fssh_strcasestr 1274 #define strdup fssh_strdup 1275 #define stpcpy fssh_stpcpy 1276 #define strtcopy fssh_strtcopy 1277 #define strlcat fssh_strlcat 1278 #define strlcpy fssh_strlcpy 1279 #define strnlen fssh_strnlen 1280 1281 #define ffs fssh_ffs 1282 #define index fssh_index 1283 #define rindex fssh_rindex 1284 1285 1286 //////////////////////////////////////////////////////////////////////////////// 1287 // #pragma mark - fssh_time.h 1288 1289 #define clock_t fssh_clock_t 1290 #define time_t fssh_time_t 1291 #define suseconds_t fssh_suseconds_t 1292 #define useconds_t fssh_useconds_t 1293 1294 #undef CLOCKS_PER_SEC 1295 #undef CLK_TCK 1296 #undef MAX_TIMESTR 1297 1298 #define CLOCKS_PER_SEC FSSH_CLOCKS_PER_SEC 1299 #define CLK_TCK FSSH_CLK_TCK 1300 #define MAX_TIMESTR FSSH_MAX_TIMESTR 1301 1302 #define timespec fssh_timespec 1303 #define itimerspec fssh_itimerspec 1304 #define tm fssh_tm 1305 1306 /* special timezone support */ 1307 #define tzname fssh_tzname 1308 #define daylight fssh_daylight 1309 #define timezone fssh_timezone 1310 1311 #define clock fssh_clock 1312 #define difftime fssh_difftime 1313 #define mktime fssh_mktime 1314 #define time fssh_time 1315 #define asctime fssh_asctime 1316 #define asctime_r fssh_asctime_r 1317 #define ctime fssh_ctime 1318 #define ctime_r fssh_ctime_r 1319 #define gmtime fssh_gmtime 1320 #define gmtime_r fssh_gmtime_r 1321 #define localtime fssh_localtime 1322 #define localtime_r fssh_localtime_r 1323 #define strftime fssh_strftime 1324 #define strptime fssh_strptime 1325 1326 /* special timezone support */ 1327 #define tzset fssh_tzset 1328 #define stime fssh_stime 1329 1330 1331 //////////////////////////////////////////////////////////////////////////////// 1332 // #pragma mark - fssh_type_constants.h 1333 1334 #define B_ANY_TYPE FSSH_B_ANY_TYPE 1335 #define B_ATOM_TYPE FSSH_B_ATOM_TYPE 1336 #define B_ATOMREF_TYPE FSSH_B_ATOMREF_TYPE 1337 #define B_BOOL_TYPE FSSH_B_BOOL_TYPE 1338 #define B_CHAR_TYPE FSSH_B_CHAR_TYPE 1339 #define B_COLOR_8_BIT_TYPE FSSH_B_COLOR_8_BIT_TYPE 1340 #define B_DOUBLE_TYPE FSSH_B_DOUBLE_TYPE 1341 #define B_FLOAT_TYPE FSSH_B_FLOAT_TYPE 1342 #define B_GRAYSCALE_8_BIT_TYPE FSSH_B_GRAYSCALE_8_BIT_TYPE 1343 #define B_INT16_TYPE FSSH_B_INT16_TYPE 1344 #define B_INT32_TYPE FSSH_B_INT32_TYPE 1345 #define B_INT64_TYPE FSSH_B_INT64_TYPE 1346 #define B_INT8_TYPE FSSH_B_INT8_TYPE 1347 #define B_LARGE_ICON_TYPE FSSH_B_LARGE_ICON_TYPE 1348 #define B_MEDIA_PARAMETER_GROUP_TYPE FSSH_B_MEDIA_PARAMETER_GROUP_TYPE 1349 #define B_MEDIA_PARAMETER_TYPE FSSH_B_MEDIA_PARAMETER_TYPE 1350 #define B_MEDIA_PARAMETER_WEB_TYPE FSSH_B_MEDIA_PARAMETER_WEB_TYPE 1351 #define B_MESSAGE_TYPE FSSH_B_MESSAGE_TYPE 1352 #define B_MESSENGER_TYPE FSSH_B_MESSENGER_TYPE 1353 #define B_MIME_TYPE FSSH_B_MIME_TYPE 1354 #define B_MINI_ICON_TYPE FSSH_B_MINI_ICON_TYPE 1355 #define B_MONOCHROME_1_BIT_TYPE FSSH_B_MONOCHROME_1_BIT_TYPE 1356 #define B_OBJECT_TYPE FSSH_B_OBJECT_TYPE 1357 #define B_OFF_T_TYPE FSSH_B_OFF_T_TYPE 1358 #define B_PATTERN_TYPE FSSH_B_PATTERN_TYPE 1359 #define B_POINTER_TYPE FSSH_B_POINTER_TYPE 1360 #define B_POINT_TYPE FSSH_B_POINT_TYPE 1361 #define B_PROPERTY_INFO_TYPE FSSH_B_PROPERTY_INFO_TYPE 1362 #define B_RAW_TYPE FSSH_B_RAW_TYPE 1363 #define B_RECT_TYPE FSSH_B_RECT_TYPE 1364 #define B_REF_TYPE FSSH_B_REF_TYPE 1365 #define B_RGB_32_BIT_TYPE FSSH_B_RGB_32_BIT_TYPE 1366 #define B_RGB_COLOR_TYPE FSSH_B_RGB_COLOR_TYPE 1367 #define B_SIZE_T_TYPE FSSH_B_SIZE_T_TYPE 1368 #define B_SSIZE_T_TYPE FSSH_B_SSIZE_T_TYPE 1369 #define B_STRING_TYPE FSSH_B_STRING_TYPE 1370 #define B_TIME_TYPE FSSH_B_TIME_TYPE 1371 #define B_UINT16_TYPE FSSH_B_UINT16_TYPE 1372 #define B_UINT32_TYPE FSSH_B_UINT32_TYPE 1373 #define B_UINT64_TYPE FSSH_B_UINT64_TYPE 1374 #define B_UINT8_TYPE FSSH_B_UINT8_TYPE 1375 #define B_VECTOR_ICON_TYPE FSSH_B_VECTOR_ICON_TYPE 1376 #define B_ASCII_TYPE FSSH_B_ASCII_TYPE 1377 1378 //----- System-wide MIME types for handling URL's ------------------------------ 1379 1380 #define B_URL_HTTP FSSH_B_URL_HTTP 1381 #define B_URL_HTTPS FSSH_B_URL_HTTPS 1382 #define B_URL_FTP FSSH_B_URL_FTP 1383 #define B_URL_GOPHER FSSH_B_URL_GOPHER 1384 #define B_URL_MAILTO FSSH_B_URL_MAILTO 1385 #define B_URL_NEWS FSSH_B_URL_NEWS 1386 #define B_URL_NNTP FSSH_B_URL_NNTP 1387 #define B_URL_TELNET FSSH_B_URL_TELNET 1388 #define B_URL_RLOGIN FSSH_B_URL_RLOGIN 1389 #define B_URL_TN3270 FSSH_B_URL_TN3270 1390 #define B_URL_WAIS FSSH_B_URL_WAIS 1391 #define B_URL_FILE FSSH_B_URL_FILE 1392 1393 1394 //////////////////////////////////////////////////////////////////////////////// 1395 // #pragma mark - fssh_types.h 1396 1397 #define ulong fssh_ulong 1398 1399 #define addr_t fssh_addr_t 1400 1401 #define dev_t fssh_dev_t 1402 #define ino_t fssh_ino_t 1403 1404 #define size_t fssh_size_t 1405 #define ssize_t fssh_ssize_t 1406 #define off_t fssh_off_t 1407 1408 #define bigtime_t fssh_bigtime_t 1409 1410 #define status_t fssh_status_t 1411 #define type_code fssh_type_code 1412 1413 #define mode_t fssh_mode_t 1414 #define nlink_t fssh_nlink_t 1415 #define uid_t fssh_uid_t 1416 #define gid_t fssh_gid_t 1417 #define pid_t fssh_pid_t 1418 1419 1420 //////////////////////////////////////////////////////////////////////////////// 1421 // #pragma mark - fssh_uio.h 1422 1423 #define iovec fssh_iovec 1424 1425 #define readv fssh_readv 1426 #define readv_pos fssh_readv_pos 1427 #define writev fssh_writev 1428 #define writev_pos fssh_writev_pos 1429 1430 1431 //////////////////////////////////////////////////////////////////////////////// 1432 // #pragma mark - fssh_unistd.h 1433 1434 /* access modes */ 1435 #define R_OK FSSH_R_OK 1436 #define W_OK FSSH_W_OK 1437 #define X_OK FSSH_X_OK 1438 #define F_OK FSSH_F_OK 1439 1440 /* standard file descriptors */ 1441 #define STDIN_FILENO FSSH_STDIN_FILENO 1442 #define STDOUT_FILENO FSSH_STDOUT_FILENO 1443 #define STDERR_FILENO FSSH_STDERR_FILENO 1444 1445 /* lseek() constants */ 1446 #define SEEK_SET FSSH_SEEK_SET 1447 #define SEEK_CUR FSSH_SEEK_CUR 1448 #define SEEK_END FSSH_SEEK_END 1449 1450 /* file functions */ 1451 #define access fssh_access 1452 1453 #define chdir fssh_chdir 1454 #define fchdir fssh_fchdir 1455 #define getcwd fssh_getcwd 1456 1457 #define dup fssh_dup 1458 #define dup2 fssh_dup2 1459 #define close fssh_close 1460 #define link fssh_link 1461 #define unlink fssh_unlink 1462 #define rmdir fssh_rmdir 1463 1464 #define readlink fssh_readlink 1465 #define symlink fssh_symlink 1466 1467 #define ftruncate fssh_ftruncate 1468 #define truncate fssh_truncate 1469 #define ioctl fssh_ioctl 1470 1471 #define read fssh_read 1472 #define read_pos fssh_read_pos 1473 #define pread fssh_pread 1474 #define write fssh_write 1475 #define write_pos fssh_write_pos 1476 #define pwrite fssh_pwrite 1477 #define lseek fssh_lseek 1478 1479 #define sync fssh_sync 1480 #define fsync fssh_fsync 1481 1482 /* access permissions */ 1483 #define getegid fssh_getegid 1484 #define geteuid fssh_geteuid 1485 #define getgid fssh_getgid 1486 #define getgroups fssh_getgroups 1487 #define getuid fssh_getuid 1488 1489 1490 //////////////////////////////////////////////////////////////////////////////// 1491 // int types 1492 1493 #define int8 int8_t 1494 #define uint8 uint8_t 1495 #define int16 int16_t 1496 #define uint16 uint16_t 1497 #define int32 int32_t 1498 #define uint32 uint32_t 1499 #define int64 int64_t 1500 #define uint64 uint64_t 1501 1502 #define vint32 vint32_t 1503 1504 1505 #endif // _FSSH_API_WRAPPER_H 1506