8 // #prama mark - iterating, retrieving device/partition data
10 _kern_get_next_disk_device_id(int32
*cookie
, size_t *neededSize
)
17 _kern_find_disk_device(const char *filename
, size_t *neededSize
)
24 _kern_find_partition(const char *filename
, size_t *neededSize
)
31 _kern_get_disk_device_data(partition_id deviceID
, bool deviceOnly
,
32 bool shadow
, struct user_disk_device_data
*buffer
, size_t bufferSize
,
40 _kern_register_file_device(const char *filename
)
47 _kern_unregister_file_device(partition_id deviceID
, const char *filename
)
52 // #pragma mark - disk systems
55 _kern_get_disk_system_info(disk_system_id id
,
56 struct user_disk_system_info
*info
)
63 _kern_get_next_disk_system_info(int32
*cookie
,
64 struct user_disk_system_info
*info
)
71 _kern_find_disk_system(const char *name
,
72 struct user_disk_system_info
*info
)
79 _kern_supports_defragmenting_partition(partition_id partitionID
,
80 int32 changeCounter
, bool *whileMounted
)
87 _kern_supports_repairing_partition(partition_id partitionID
,
88 int32 changeCounter
, bool checkOnly
, bool *whileMounted
)
95 _kern_supports_resizing_partition(partition_id partitionID
,
96 int32 changeCounter
, bool *canResizeContents
, bool *whileMounted
)
103 _kern_supports_moving_partition(partition_id partitionID
,
104 int32 changeCounter
, partition_id
*unmovable
,
105 partition_id
*needUnmounting
, size_t bufferSize
)
112 _kern_supports_setting_partition_name(partition_id partitionID
,
120 _kern_supports_setting_partition_content_name(partition_id partitionID
,
121 int32 changeCounter
, bool *whileMounted
)
128 _kern_supports_setting_partition_type(partition_id partitionID
,
136 _kern_supports_setting_partition_parameters(partition_id partitionID
,
144 _kern_supports_setting_partition_content_parameters(
145 partition_id partitionID
, int32 changeCounter
, bool *whileMounted
)
152 _kern_supports_initializing_partition(partition_id partitionID
,
153 int32 changeCounter
, const char *diskSystemName
)
160 _kern_supports_creating_child_partition(partition_id partitionID
,
168 _kern_supports_deleting_child_partition(partition_id partitionID
,
176 _kern_is_sub_disk_system_for(disk_system_id diskSystemID
,
177 partition_id partitionID
, int32 changeCounter
)
185 _kern_validate_resize_partition(partition_id partitionID
, int32 changeCounter
,
193 _kern_validate_move_partition(partition_id partitionID
, int32 changeCounter
,
201 _kern_validate_set_partition_name(partition_id partitionID
, int32 changeCounter
,
209 _kern_validate_set_partition_content_name(partition_id partitionID
,
210 int32 changeCounter
, char *name
)
217 _kern_validate_set_partition_type(partition_id partitionID
, int32 changeCounter
,
225 _kern_validate_initialize_partition(partition_id partitionID
,
226 int32 changeCounter
, const char *diskSystemName
, char *name
,
227 const char *parameters
, size_t parametersSize
)
234 _kern_validate_create_child_partition(partition_id partitionID
,
235 int32 changeCounter
, off_t
*offset
, off_t
*size
, const char *type
,
236 const char *parameters
, size_t parametersSize
)
243 _kern_get_partitionable_spaces(partition_id partitionID
, int32 changeCounter
,
244 struct partitionable_space_data
*buffer
, int32 count
, int32
*actualCount
)
251 _kern_get_next_supported_partition_type(partition_id partitionID
,
252 int32 changeCounter
, int32
*cookie
, char *type
)
259 _kern_get_partition_type_for_content_type(disk_system_id diskSystemID
,
260 const char *contentType
, char *type
)
265 // #pragma mark - disk device modification
268 _kern_prepare_disk_device_modifications(partition_id deviceID
)
275 _kern_commit_disk_device_modifications(partition_id deviceID
,
276 port_id port
, int32 token
, bool completeProgress
)
283 _kern_cancel_disk_device_modifications(partition_id deviceID
)
290 _kern_is_disk_device_modified(partition_id deviceID
)
297 _kern_defragment_partition(partition_id partitionID
, int32 changeCounter
)
304 _kern_repair_partition(partition_id partitionID
, int32 changeCounter
,
312 _kern_resize_partition(partition_id partitionID
, int32 changeCounter
,
320 _kern_move_partition(partition_id partitionID
, int32 changeCounter
,
328 _kern_set_partition_name(partition_id partitionID
, int32 changeCounter
,
336 _kern_set_partition_content_name(partition_id partitionID
,
337 int32 changeCounter
, const char *name
)
344 _kern_set_partition_type(partition_id partitionID
, int32 changeCounter
,
352 _kern_set_partition_parameters(partition_id partitionID
, int32 changeCounter
,
353 const char *parameters
, size_t parametersSize
)
360 _kern_set_partition_content_parameters(partition_id partitionID
,
361 int32 changeCounter
, const char *parameters
, size_t parametersSize
)
368 _kern_initialize_partition(partition_id partitionID
, int32 changeCounter
,
369 const char *diskSystemName
, const char *name
, const char *parameters
,
370 size_t parametersSize
)
377 _kern_uninitialize_partition(partition_id partitionID
, int32 changeCounter
,
378 partition_id parentID
, int32 parentChangeCounter
)
385 _kern_create_child_partition(partition_id partitionID
, int32 changeCounter
,
386 off_t offset
, off_t size
, const char *type
, const char *parameters
,
387 size_t parametersSize
, partition_id
*childID
)
394 _kern_delete_partition(partition_id partitionID
, int32 changeCounter
)
401 _kern_delete_child_partition(partition_id partitionID
, int32
* changeCounter
,
402 partition_id childID
, int32 childChangeCounter
)
408 // #pragma mark - jobs
412 _kern_get_next_disk_device_job_info(int32
*cookie
,
413 struct user_disk_device_job_info
*info
)
420 _kern_get_disk_device_job_info(disk_job_id id
,
421 struct user_disk_device_job_info
*info
)
428 _kern_get_disk_device_job_progress_info(disk_job_id id
,
429 struct disk_device_job_progress_info
*info
)
436 _kern_pause_disk_device_job(disk_job_id id
)
443 _kern_cancel_disk_device_job(disk_job_id id
, bool reverse
)
448 // #pragma mark - other syscalls
451 _kern_get_safemode_option(const char *parameter
, char *buffer
,