Patch by Bryce Groff: Style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31907 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -27,7 +27,7 @@ public:
|
||||
partition_id PartitionId() const;
|
||||
|
||||
protected:
|
||||
const disk_device_data *fDevice;
|
||||
const disk_device_data* fDevice;
|
||||
|
||||
private:
|
||||
partition_id fPartitionID;
|
||||
|
||||
@@ -58,7 +58,7 @@ using std::nothrow;
|
||||
#ifdef _BOOT_MODE
|
||||
|
||||
inline int32
|
||||
atomic_add(int32 *a, int32 num)
|
||||
atomic_add(int32* a, int32 num)
|
||||
{
|
||||
int32 oldA = *a;
|
||||
*a += num;
|
||||
@@ -72,7 +72,7 @@ atomic_add(int32 *a, int32 num)
|
||||
|
||||
// get_type_for_content_type (for both pm_* and ep_*)
|
||||
static status_t
|
||||
get_type_for_content_type(const char *contentType, char *type)
|
||||
get_type_for_content_type(const char* contentType, char* type)
|
||||
{
|
||||
TRACE(("intel: get_type_for_content_type(%s)\n",
|
||||
contentType));
|
||||
@@ -111,7 +111,7 @@ pm_std_ops(int32 op, ...)
|
||||
|
||||
// pm_identify_partition
|
||||
static float
|
||||
pm_identify_partition(int fd, partition_data *partition, void **cookie)
|
||||
pm_identify_partition(int fd, partition_data* partition, void** cookie)
|
||||
{
|
||||
// check parameters
|
||||
if (fd < 0 || !partition || !cookie)
|
||||
@@ -127,7 +127,7 @@ pm_identify_partition(int fd, partition_data *partition, void **cookie)
|
||||
}
|
||||
|
||||
// allocate a PartitionMap
|
||||
PartitionMapCookie *map = new(nothrow) PartitionMapCookie;
|
||||
PartitionMapCookie* map = new(nothrow) PartitionMapCookie;
|
||||
if (!map)
|
||||
return -1;
|
||||
|
||||
@@ -176,7 +176,7 @@ pm_identify_partition(int fd, partition_data *partition, void **cookie)
|
||||
|
||||
// pm_scan_partition
|
||||
static status_t
|
||||
pm_scan_partition(int fd, partition_data *partition, void *cookie)
|
||||
pm_scan_partition(int fd, partition_data* partition, void* cookie)
|
||||
{
|
||||
// check parameters
|
||||
if (fd < 0 || !partition || !cookie)
|
||||
@@ -186,7 +186,7 @@ pm_scan_partition(int fd, partition_data *partition, void *cookie)
|
||||
partition->id, partition->offset, partition->size,
|
||||
partition->block_size));
|
||||
|
||||
PartitionMapCookie *map = (PartitionMapCookie*)cookie;
|
||||
PartitionMapCookie* map = (PartitionMapCookie*)cookie;
|
||||
// fill in the partition_data structure
|
||||
partition->status = B_PARTITION_VALID;
|
||||
partition->flags |= B_PARTITION_PARTITIONING_SYSTEM;
|
||||
@@ -199,9 +199,9 @@ pm_scan_partition(int fd, partition_data *partition, void *cookie)
|
||||
status_t error = B_OK;
|
||||
int32 index = 0;
|
||||
for (int32 i = 0; i < 4; i++) {
|
||||
PrimaryPartition *primary = map->PrimaryPartitionAt(i);
|
||||
PrimaryPartition* primary = map->PrimaryPartitionAt(i);
|
||||
if (!primary->IsEmpty()) {
|
||||
partition_data *child = create_child_partition(partition->id,
|
||||
partition_data* child = create_child_partition(partition->id,
|
||||
index, partition->offset + primary->Offset(), primary->Size(),
|
||||
-1);
|
||||
index++;
|
||||
@@ -237,7 +237,7 @@ pm_scan_partition(int fd, partition_data *partition, void *cookie)
|
||||
} else {
|
||||
partition->content_cookie = NULL;
|
||||
for (int32 i = 0; i < partition->child_count; i++) {
|
||||
if (partition_data *child = get_child_partition(partition->id, i))
|
||||
if (partition_data* child = get_child_partition(partition->id, i))
|
||||
child->cookie = NULL;
|
||||
}
|
||||
}
|
||||
@@ -248,10 +248,10 @@ pm_scan_partition(int fd, partition_data *partition, void *cookie)
|
||||
|
||||
// pm_free_identify_partition_cookie
|
||||
static void
|
||||
pm_free_identify_partition_cookie(partition_data */*partition*/, void *cookie)
|
||||
pm_free_identify_partition_cookie(partition_data*/* partition*/, void* cookie)
|
||||
{
|
||||
if (cookie) {
|
||||
PartitionMapCookie *map = (PartitionMapCookie*)cookie;
|
||||
PartitionMapCookie* map = (PartitionMapCookie*)cookie;
|
||||
if (atomic_add(&map->ref_count, -1) == 1)
|
||||
delete map;
|
||||
}
|
||||
@@ -260,7 +260,7 @@ pm_free_identify_partition_cookie(partition_data */*partition*/, void *cookie)
|
||||
|
||||
// pm_free_partition_cookie
|
||||
static void
|
||||
pm_free_partition_cookie(partition_data *partition)
|
||||
pm_free_partition_cookie(partition_data* partition)
|
||||
{
|
||||
// called for the primary partitions: the PrimaryPartition is allocated
|
||||
// by the partition containing the partition map
|
||||
@@ -271,7 +271,7 @@ pm_free_partition_cookie(partition_data *partition)
|
||||
|
||||
// pm_free_partition_content_cookie
|
||||
static void
|
||||
pm_free_partition_content_cookie(partition_data *partition)
|
||||
pm_free_partition_content_cookie(partition_data* partition)
|
||||
{
|
||||
if (partition && partition->content_cookie) {
|
||||
pm_free_identify_partition_cookie(partition, partition->content_cookie);
|
||||
@@ -299,7 +299,7 @@ ep_std_ops(int32 op, ...)
|
||||
|
||||
// ep_identify_partition
|
||||
static float
|
||||
ep_identify_partition(int fd, partition_data *partition, void **cookie)
|
||||
ep_identify_partition(int fd, partition_data* partition, void** cookie)
|
||||
{
|
||||
// check parameters
|
||||
if (fd < 0 || !partition || !cookie || !partition->cookie)
|
||||
@@ -314,7 +314,7 @@ ep_identify_partition(int fd, partition_data *partition, void **cookie)
|
||||
|| strcmp(partition->type, kPartitionTypeIntelExtended)) {
|
||||
return -1;
|
||||
}
|
||||
partition_data *parent = get_parent_partition(partition->id);
|
||||
partition_data* parent = get_parent_partition(partition->id);
|
||||
if (!parent || !parent->content_type
|
||||
|| strcmp(parent->content_type, kPartitionTypeIntel)) {
|
||||
return -1;
|
||||
@@ -327,7 +327,7 @@ ep_identify_partition(int fd, partition_data *partition, void **cookie)
|
||||
|
||||
// ep_scan_partition
|
||||
static status_t
|
||||
ep_scan_partition(int fd, partition_data *partition, void *cookie)
|
||||
ep_scan_partition(int fd, partition_data* partition, void* cookie)
|
||||
{
|
||||
// check parameters
|
||||
if (fd < 0 || !partition || !partition->cookie)
|
||||
@@ -336,10 +336,10 @@ ep_scan_partition(int fd, partition_data *partition, void *cookie)
|
||||
TRACE(("intel: ep_scan_partition(%d, %lld, %lld, %ld)\n", fd,
|
||||
partition->offset, partition->size, partition->block_size));
|
||||
|
||||
partition_data *parent = get_parent_partition(partition->id);
|
||||
partition_data* parent = get_parent_partition(partition->id);
|
||||
if (!parent)
|
||||
return B_ERROR;
|
||||
PrimaryPartition *primary = (PrimaryPartition*)partition->cookie;
|
||||
PrimaryPartition* primary = (PrimaryPartition*)partition->cookie;
|
||||
// fill in the partition_data structure
|
||||
partition->status = B_PARTITION_VALID;
|
||||
partition->flags |= B_PARTITION_PARTITIONING_SYSTEM;
|
||||
@@ -352,8 +352,8 @@ ep_scan_partition(int fd, partition_data *partition, void *cookie)
|
||||
status_t error = B_OK;
|
||||
int32 index = 0;
|
||||
for (int32 i = 0; i < primary->CountLogicalPartitions(); i++) {
|
||||
LogicalPartition *logical = primary->LogicalPartitionAt(i);
|
||||
partition_data *child = create_child_partition(partition->id, index,
|
||||
LogicalPartition* logical = primary->LogicalPartitionAt(i);
|
||||
partition_data* child = create_child_partition(partition->id, index,
|
||||
parent->offset + logical->Offset(), logical->Size(), -1);
|
||||
index++;
|
||||
if (!child) {
|
||||
@@ -389,7 +389,7 @@ ep_scan_partition(int fd, partition_data *partition, void *cookie)
|
||||
if (error != B_OK) {
|
||||
partition->content_cookie = NULL;
|
||||
for (int32 i = 0; i < partition->child_count; i++) {
|
||||
if (partition_data *child = get_child_partition(partition->id, i))
|
||||
if (partition_data* child = get_child_partition(partition->id, i))
|
||||
child->cookie = NULL;
|
||||
}
|
||||
}
|
||||
@@ -399,7 +399,7 @@ ep_scan_partition(int fd, partition_data *partition, void *cookie)
|
||||
|
||||
// ep_free_identify_partition_cookie
|
||||
static void
|
||||
ep_free_identify_partition_cookie(partition_data *partition, void *cookie)
|
||||
ep_free_identify_partition_cookie(partition_data* partition, void* cookie)
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
@@ -407,7 +407,7 @@ ep_free_identify_partition_cookie(partition_data *partition, void *cookie)
|
||||
|
||||
// ep_free_partition_cookie
|
||||
static void
|
||||
ep_free_partition_cookie(partition_data *partition)
|
||||
ep_free_partition_cookie(partition_data* partition)
|
||||
{
|
||||
// the logical partition's cookie belongs to the partition map partition
|
||||
if (partition)
|
||||
@@ -417,7 +417,7 @@ ep_free_partition_cookie(partition_data *partition)
|
||||
|
||||
// ep_free_partition_content_cookie
|
||||
static void
|
||||
ep_free_partition_content_cookie(partition_data *partition)
|
||||
ep_free_partition_content_cookie(partition_data* partition)
|
||||
{
|
||||
// the extended partition's cookie belongs to the partition map partition
|
||||
if (partition)
|
||||
@@ -603,8 +603,8 @@ static partition_module_info intel_extended_partition_module =
|
||||
|
||||
|
||||
#ifndef _BOOT_MODE
|
||||
extern "C" partition_module_info *modules[];
|
||||
_EXPORT partition_module_info *modules[] =
|
||||
extern "C" partition_module_info* modules[];
|
||||
_EXPORT partition_module_info* modules[] =
|
||||
{
|
||||
&intel_partition_map_module,
|
||||
&intel_extended_partition_module,
|
||||
|
||||
@@ -13,27 +13,27 @@ uint32 pm_get_supported_operations(partition_data* partition,
|
||||
uint32 mask = ~0);
|
||||
uint32 pm_get_supported_child_operations(partition_data* partition,
|
||||
partition_data* child, uint32 mask = ~0);
|
||||
bool pm_is_sub_system_for(partition_data *partition);
|
||||
bool pm_is_sub_system_for(partition_data* partition);
|
||||
|
||||
bool pm_validate_resize(partition_data *partition, off_t *size);
|
||||
bool pm_validate_resize_child(partition_data *partition,
|
||||
partition_data *child, off_t *size);
|
||||
bool pm_validate_move(partition_data *partition, off_t *start);
|
||||
bool pm_validate_move_child(partition_data *partition,
|
||||
partition_data *child, off_t *start);
|
||||
bool pm_validate_set_type(partition_data *partition, const char *type);
|
||||
bool pm_validate_initialize(partition_data *partition, char *name,
|
||||
const char *parameters);
|
||||
bool pm_validate_create_child(partition_data *partition, off_t *start,
|
||||
off_t *size, const char *type, const char *name,
|
||||
const char *parameters, int32 *index);
|
||||
bool pm_validate_resize(partition_data* partition, off_t* size);
|
||||
bool pm_validate_resize_child(partition_data* partition,
|
||||
partition_data* child, off_t* size);
|
||||
bool pm_validate_move(partition_data* partition, off_t* start);
|
||||
bool pm_validate_move_child(partition_data* partition,
|
||||
partition_data* child, off_t* start);
|
||||
bool pm_validate_set_type(partition_data* partition, const char* type);
|
||||
bool pm_validate_initialize(partition_data* partition, char* name,
|
||||
const char* parameters);
|
||||
bool pm_validate_create_child(partition_data* partition, off_t* start,
|
||||
off_t* size, const char* type, const char* name,
|
||||
const char* parameters, int32* index);
|
||||
|
||||
status_t pm_get_partitionable_spaces(partition_data *partition,
|
||||
partitionable_space_data *buffer, int32 count,
|
||||
int32 *actualCount);
|
||||
status_t pm_get_next_supported_type(partition_data *partition, int32 *cookie,
|
||||
char *_type);
|
||||
status_t pm_shadow_changed(partition_data *partition, partition_data *child,
|
||||
status_t pm_get_partitionable_spaces(partition_data* partition,
|
||||
partitionable_space_data* buffer, int32 count,
|
||||
int32* actualCount);
|
||||
status_t pm_get_next_supported_type(partition_data* partition,
|
||||
int32* cookie, char* _type);
|
||||
status_t pm_shadow_changed(partition_data* partition, partition_data* child,
|
||||
uint32 operation);
|
||||
|
||||
status_t pm_resize(int fd, partition_id partitionID, off_t size,
|
||||
@@ -44,14 +44,14 @@ status_t pm_move(int fd, partition_id partitionID, off_t offset,
|
||||
disk_job_id job);
|
||||
status_t pm_move_child(int fd, partition_id partitionID,
|
||||
partition_id childID, off_t offset, disk_job_id job);
|
||||
status_t pm_set_type(int fd, partition_id partitionID, const char *type,
|
||||
status_t pm_set_type(int fd, partition_id partitionID, const char* type,
|
||||
disk_job_id job);
|
||||
status_t pm_initialize(int fd, partition_id partitionID, const char *name,
|
||||
const char *parameters, off_t partitionSize, disk_job_id job);
|
||||
status_t pm_initialize(int fd, partition_id partitionID, const char* name,
|
||||
const char* parameters, off_t partitionSize, disk_job_id job);
|
||||
status_t pm_create_child(int fd, partition_id partitionID, off_t offset,
|
||||
off_t size, const char *type, const char *name,
|
||||
const char *parameters, disk_job_id job,
|
||||
partition_id *childID);
|
||||
off_t size, const char* type, const char* name,
|
||||
const char* parameters, disk_job_id job,
|
||||
partition_id* childID);
|
||||
status_t pm_delete_child(int fd, partition_id partitionID,
|
||||
partition_id childID, disk_job_id job);
|
||||
|
||||
@@ -60,26 +60,26 @@ uint32 ep_get_supported_operations(partition_data* partition,
|
||||
uint32 mask = ~0);
|
||||
uint32 ep_get_supported_child_operations(partition_data* partition,
|
||||
partition_data* child, uint32 mask = ~0);
|
||||
bool ep_is_sub_system_for(partition_data *partition);
|
||||
bool ep_is_sub_system_for(partition_data* partition);
|
||||
|
||||
bool ep_validate_resize(partition_data *partition, off_t *size);
|
||||
bool ep_validate_resize_child(partition_data *partition,
|
||||
partition_data *child, off_t *_size);
|
||||
bool ep_validate_move(partition_data *partition, off_t *start);
|
||||
bool ep_validate_move_child(partition_data *partition,
|
||||
partition_data *child, off_t *_start);
|
||||
bool ep_validate_set_type(partition_data *partition, const char *type);
|
||||
bool ep_validate_initialize(partition_data *partition, char *name,
|
||||
const char *parameters);
|
||||
bool ep_validate_create_child(partition_data *partition, off_t *_start,
|
||||
off_t *_size, const char *type, const char* name,
|
||||
const char *parameters, int32 *index);
|
||||
status_t ep_get_partitionable_spaces(partition_data *partition,
|
||||
partitionable_space_data *buffer, int32 count,
|
||||
int32 *actualCount);
|
||||
status_t ep_get_next_supported_type(partition_data *partition, int32 *cookie,
|
||||
char *_type);
|
||||
status_t ep_shadow_changed(partition_data *partition, partition_data *child,
|
||||
bool ep_validate_resize(partition_data* partition, off_t* size);
|
||||
bool ep_validate_resize_child(partition_data* partition,
|
||||
partition_data* child, off_t* _size);
|
||||
bool ep_validate_move(partition_data* partition, off_t* start);
|
||||
bool ep_validate_move_child(partition_data* partition,
|
||||
partition_data* child, off_t* _start);
|
||||
bool ep_validate_set_type(partition_data* partition, const char* type);
|
||||
bool ep_validate_initialize(partition_data* partition, char* name,
|
||||
const char* parameters);
|
||||
bool ep_validate_create_child(partition_data* partition, off_t* _start,
|
||||
off_t* _size, const char* type, const char* name,
|
||||
const char* parameters, int32* index);
|
||||
status_t ep_get_partitionable_spaces(partition_data* partition,
|
||||
partitionable_space_data* buffer, int32 count,
|
||||
int32* actualCount);
|
||||
status_t ep_get_next_supported_type(partition_data* partition,
|
||||
int32* cookie, char* _type);
|
||||
status_t ep_shadow_changed(partition_data* partition, partition_data* child,
|
||||
uint32 operation);
|
||||
|
||||
status_t ep_resize(int fd, partition_id partitionID, off_t size,
|
||||
@@ -90,14 +90,14 @@ status_t ep_move(int fd, partition_id partitionID, off_t offset,
|
||||
disk_job_id job);
|
||||
status_t ep_move_child(int fd, partition_id partitionID,
|
||||
partition_id childID, off_t offset, disk_job_id job);
|
||||
status_t ep_set_type(int fd, partition_id partitionID, const char *type,
|
||||
status_t ep_set_type(int fd, partition_id partitionID, const char* type,
|
||||
disk_job_id job);
|
||||
status_t ep_initialize(int fd, partition_id partitionID, const char *name,
|
||||
const char *parameters, off_t partitionSize, disk_job_id job);
|
||||
status_t ep_initialize(int fd, partition_id partitionID, const char* name,
|
||||
const char* parameters, off_t partitionSize, disk_job_id job);
|
||||
status_t ep_create_child(int fd, partition_id partitionID, off_t offset,
|
||||
off_t size, const char *type, const char *name,
|
||||
const char *parameters, disk_job_id job,
|
||||
partition_id *childID);
|
||||
off_t size, const char* type, const char* name,
|
||||
const char* parameters, disk_job_id job,
|
||||
partition_id* childID);
|
||||
status_t ep_delete_child(int fd, partition_id partitionID,
|
||||
partition_id childID, disk_job_id job);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user