2 * Copyright 2007, Ingo Weinhold, bonefish@cs.tu-berlin.de. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 #ifndef INTEL_WRITE_SUPPORT_H
6 #define INTEL_WRITE_SUPPORT_H
9 #include <disk_device_manager/ddm_modules.h>
12 uint32
pm_get_supported_operations(partition_data
* partition
,
14 uint32
pm_get_supported_child_operations(partition_data
* partition
,
15 partition_data
* child
, uint32 mask
= ~0);
16 bool pm_is_sub_system_for(partition_data
* partition
);
18 bool pm_validate_resize(partition_data
* partition
, off_t
* size
);
19 bool pm_validate_resize_child(partition_data
* partition
,
20 partition_data
* child
, off_t
* size
);
21 bool pm_validate_move(partition_data
* partition
, off_t
* start
);
22 bool pm_validate_move_child(partition_data
* partition
,
23 partition_data
* child
, off_t
* start
);
24 bool pm_validate_set_type(partition_data
* partition
, const char* type
);
25 bool pm_validate_initialize(partition_data
* partition
, char* name
,
26 const char* parameters
);
27 bool pm_validate_create_child(partition_data
* partition
, off_t
* start
,
28 off_t
* size
, const char* type
, const char* name
,
29 const char* parameters
, int32
* index
);
31 status_t
pm_get_partitionable_spaces(partition_data
* partition
,
32 partitionable_space_data
* buffer
, int32 count
,
34 status_t
pm_get_next_supported_type(partition_data
* partition
,
35 int32
* cookie
, char* _type
);
36 status_t
pm_shadow_changed(partition_data
* partition
, partition_data
* child
,
39 status_t
pm_resize(int fd
, partition_id partitionID
, off_t size
,
41 status_t
pm_resize_child(int fd
, partition_id partitionID
, off_t size
,
43 status_t
pm_move(int fd
, partition_id partitionID
, off_t offset
,
45 status_t
pm_move_child(int fd
, partition_id partitionID
,
46 partition_id childID
, off_t offset
, disk_job_id job
);
47 status_t
pm_set_type(int fd
, partition_id partitionID
, const char* type
,
49 status_t
pm_initialize(int fd
, partition_id partitionID
, const char* name
,
50 const char* parameters
, off_t partitionSize
, disk_job_id job
);
51 status_t
pm_uninitialize(int fd
, partition_id partitionID
,
52 off_t partitionSize
, uint32 blockSize
, disk_job_id job
);
53 status_t
pm_create_child(int fd
, partition_id partitionID
, off_t offset
,
54 off_t size
, const char* type
, const char* name
,
55 const char* parameters
, disk_job_id job
,
56 partition_id
* childID
);
57 status_t
pm_delete_child(int fd
, partition_id partitionID
,
58 partition_id childID
, disk_job_id job
);
61 uint32
ep_get_supported_operations(partition_data
* partition
,
63 uint32
ep_get_supported_child_operations(partition_data
* partition
,
64 partition_data
* child
, uint32 mask
= ~0);
65 bool ep_is_sub_system_for(partition_data
* partition
);
67 bool ep_validate_resize(partition_data
* partition
, off_t
* size
);
68 bool ep_validate_resize_child(partition_data
* partition
,
69 partition_data
* child
, off_t
* _size
);
70 bool ep_validate_move(partition_data
* partition
, off_t
* start
);
71 bool ep_validate_move_child(partition_data
* partition
,
72 partition_data
* child
, off_t
* _start
);
73 bool ep_validate_set_type(partition_data
* partition
, const char* type
);
74 bool ep_validate_initialize(partition_data
* partition
, char* name
,
75 const char* parameters
);
76 bool ep_validate_create_child(partition_data
* partition
, off_t
* _start
,
77 off_t
* _size
, const char* type
, const char* name
,
78 const char* parameters
, int32
* index
);
79 status_t
ep_get_partitionable_spaces(partition_data
* partition
,
80 partitionable_space_data
* buffer
, int32 count
,
82 status_t
ep_get_next_supported_type(partition_data
* partition
,
83 int32
* cookie
, char* _type
);
84 status_t
ep_shadow_changed(partition_data
* partition
, partition_data
* child
,
87 status_t
ep_resize(int fd
, partition_id partitionID
, off_t size
,
89 status_t
ep_resize_child(int fd
, partition_id partitionID
, off_t size
,
91 status_t
ep_move(int fd
, partition_id partitionID
, off_t offset
,
93 status_t
ep_move_child(int fd
, partition_id partitionID
,
94 partition_id childID
, off_t offset
, disk_job_id job
);
95 status_t
ep_set_type(int fd
, partition_id partitionID
, const char* type
,
97 status_t
ep_initialize(int fd
, partition_id partitionID
, const char* name
,
98 const char* parameters
, off_t partitionSize
, disk_job_id job
);
99 status_t
ep_create_child(int fd
, partition_id partitionID
, off_t offset
,
100 off_t size
, const char* type
, const char* name
,
101 const char* parameters
, disk_job_id job
,
102 partition_id
* childID
);
103 status_t
ep_delete_child(int fd
, partition_id partitionID
,
104 partition_id childID
, disk_job_id job
);
107 #endif // INTEL_WRITE_SUPPORT_H