Updated to use new parametersSize params where applicable.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5156 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
229c00c5a7
commit
2094b5ffbb
@ -140,12 +140,14 @@ status_t _kern_validate_initialize_partition(partition_id partitionID,
|
|||||||
int32 changeCounter,
|
int32 changeCounter,
|
||||||
const char *diskSystemName,
|
const char *diskSystemName,
|
||||||
char *name,
|
char *name,
|
||||||
const char *parameters);
|
const char *parameters,
|
||||||
|
size_t parametersSize);
|
||||||
status_t _kern_validate_create_child_partition(partition_id partitionID,
|
status_t _kern_validate_create_child_partition(partition_id partitionID,
|
||||||
int32 changeCounter,
|
int32 changeCounter,
|
||||||
off_t *offset, off_t *size,
|
off_t *offset, off_t *size,
|
||||||
const char *type,
|
const char *type,
|
||||||
const char *parameters);
|
const char *parameters,
|
||||||
|
size_t parametersSize);
|
||||||
status_t _kern_get_partitionable_spaces(partition_id partitionID,
|
status_t _kern_get_partitionable_spaces(partition_id partitionID,
|
||||||
int32 changeCounter,
|
int32 changeCounter,
|
||||||
partitionable_space_data *buffer,
|
partitionable_space_data *buffer,
|
||||||
@ -182,20 +184,24 @@ status_t _kern_set_partition_type(partition_id partitionID,
|
|||||||
int32 changeCounter, const char *type);
|
int32 changeCounter, const char *type);
|
||||||
status_t _kern_set_partition_parameters(partition_id partitionID,
|
status_t _kern_set_partition_parameters(partition_id partitionID,
|
||||||
int32 changeCounter,
|
int32 changeCounter,
|
||||||
const char *parameters);
|
const char *parameters,
|
||||||
|
size_t parametersSize);
|
||||||
status_t _kern_set_partition_content_parameters(partition_id partitionID,
|
status_t _kern_set_partition_content_parameters(partition_id partitionID,
|
||||||
int32 changeCounter,
|
int32 changeCounter,
|
||||||
const char *parameters);
|
const char *parameters,
|
||||||
|
size_t parametersSize);
|
||||||
status_t _kern_initialize_partition(partition_id partitionID,
|
status_t _kern_initialize_partition(partition_id partitionID,
|
||||||
int32 changeCounter,
|
int32 changeCounter,
|
||||||
const char *diskSystemName,
|
const char *diskSystemName,
|
||||||
const char *name, const char *parameters);
|
const char *name, const char *parameters,
|
||||||
|
size_t parametersSize);
|
||||||
status_t _kern_uninitialize_partition(partition_id partitionID,
|
status_t _kern_uninitialize_partition(partition_id partitionID,
|
||||||
int32 changeCounter);
|
int32 changeCounter);
|
||||||
status_t _kern_create_child_partition(partition_id partitionID,
|
status_t _kern_create_child_partition(partition_id partitionID,
|
||||||
int32 changeCounter, off_t offset,
|
int32 changeCounter, off_t offset,
|
||||||
off_t size, const char *type,
|
off_t size, const char *type,
|
||||||
const char *parameters,
|
const char *parameters,
|
||||||
|
size_t parametersSize,
|
||||||
partition_id *childID);
|
partition_id *childID);
|
||||||
status_t _kern_delete_partition(partition_id partitionID, int32 changeCounter);
|
status_t _kern_delete_partition(partition_id partitionID, int32 changeCounter);
|
||||||
|
|
||||||
|
@ -742,7 +742,10 @@ BPartition::SetParameters(const char *parameters)
|
|||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
status_t error = _kern_set_partition_parameters(_ShadowID(),
|
status_t error = _kern_set_partition_parameters(_ShadowID(),
|
||||||
_ChangeCounter(),
|
_ChangeCounter(),
|
||||||
parameters);
|
parameters,
|
||||||
|
(parameters
|
||||||
|
? strlen(parameters)+1
|
||||||
|
: 0));
|
||||||
if (error == B_OK)
|
if (error == B_OK)
|
||||||
error = Device()->Update();
|
error = Device()->Update();
|
||||||
return error;
|
return error;
|
||||||
@ -773,7 +776,10 @@ BPartition::SetContentParameters(const char *parameters)
|
|||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
status_t error = _kern_set_partition_content_parameters(_ShadowID(),
|
status_t error = _kern_set_partition_content_parameters(_ShadowID(),
|
||||||
_ChangeCounter(),
|
_ChangeCounter(),
|
||||||
parameters);
|
parameters,
|
||||||
|
(parameters
|
||||||
|
? strlen(parameters)+1
|
||||||
|
: 0));
|
||||||
if (error == B_OK)
|
if (error == B_OK)
|
||||||
error = Device()->Update();
|
error = Device()->Update();
|
||||||
return error;
|
return error;
|
||||||
@ -806,7 +812,8 @@ BPartition::ValidateInitialize(const char *diskSystem, char *name,
|
|||||||
if (!fPartitionData || !_IsShadow() || !diskSystem || !name)
|
if (!fPartitionData || !_IsShadow() || !diskSystem || !name)
|
||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
return _kern_validate_initialize_partition(_ShadowID(), _ChangeCounter(),
|
return _kern_validate_initialize_partition(_ShadowID(), _ChangeCounter(),
|
||||||
diskSystem, name, parameters);
|
diskSystem, name, parameters,
|
||||||
|
(parameters ? strlen(parameters)+1 : 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize
|
// Initialize
|
||||||
@ -817,7 +824,8 @@ BPartition::Initialize(const char *diskSystem, const char *name,
|
|||||||
if (!fPartitionData || !_IsShadow() || !diskSystem || !name)
|
if (!fPartitionData || !_IsShadow() || !diskSystem || !name)
|
||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
status_t error = _kern_initialize_partition(_ShadowID(), _ChangeCounter(),
|
status_t error = _kern_initialize_partition(_ShadowID(), _ChangeCounter(),
|
||||||
diskSystem, name, parameters);
|
diskSystem, name, parameters,
|
||||||
|
(parameters ? strlen(parameters)+1 : 0));
|
||||||
if (error == B_OK)
|
if (error == B_OK)
|
||||||
error = Device()->Update();
|
error = Device()->Update();
|
||||||
return error;
|
return error;
|
||||||
@ -863,7 +871,8 @@ BPartition::ValidateCreateChild(off_t *offset, off_t *size, const char *type,
|
|||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
return _kern_validate_create_child_partition(_ShadowID(), _ChangeCounter(),
|
return _kern_validate_create_child_partition(_ShadowID(), _ChangeCounter(),
|
||||||
offset, size, type,
|
offset, size, type,
|
||||||
parameters);
|
parameters,
|
||||||
|
(parameters ? strlen(parameters)+1 : 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
// CreateChild
|
// CreateChild
|
||||||
@ -877,7 +886,7 @@ BPartition::CreateChild(off_t offset, off_t size, const char *type,
|
|||||||
partition_id childID = -1;
|
partition_id childID = -1;
|
||||||
status_t error = _kern_create_child_partition(_ShadowID(),
|
status_t error = _kern_create_child_partition(_ShadowID(),
|
||||||
_ChangeCounter(), offset, size, type, parameters,
|
_ChangeCounter(), offset, size, type, parameters,
|
||||||
&childID);
|
(parameters ? strlen(parameters)+1 : 0), &childID);
|
||||||
// update the device
|
// update the device
|
||||||
if (error == B_OK)
|
if (error == B_OK)
|
||||||
error = Device()->Update();
|
error = Device()->Update();
|
||||||
|
Loading…
Reference in New Issue
Block a user