ep_scan_partition(): Removed erroneous check for cookie (it's unused here), and fixed child index counting.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3511 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
08427f8cfc
commit
e5e5ddc13a
@ -754,7 +754,7 @@ status_t
|
|||||||
ep_scan_partition(int fd, partition_data *partition, void *cookie)
|
ep_scan_partition(int fd, partition_data *partition, void *cookie)
|
||||||
{
|
{
|
||||||
// check parameters
|
// check parameters
|
||||||
if (fd < 0 || !partition || !cookie || !partition->cookie)
|
if (fd < 0 || !partition || !partition->cookie)
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
partition_data *parent = get_parent_partition(partition->id);
|
partition_data *parent = get_parent_partition(partition->id);
|
||||||
if (!parent)
|
if (!parent)
|
||||||
@ -773,6 +773,7 @@ ep_scan_partition(int fd, partition_data *partition, void *cookie)
|
|||||||
LogicalPartition *logical = primary->LogicalPartitionAt(i);
|
LogicalPartition *logical = primary->LogicalPartitionAt(i);
|
||||||
partition_data *child = create_child_partition(partition->id,
|
partition_data *child = create_child_partition(partition->id,
|
||||||
index, -1);
|
index, -1);
|
||||||
|
index++;
|
||||||
if (!child) {
|
if (!child) {
|
||||||
// something went wrong
|
// something went wrong
|
||||||
error = B_ERROR;
|
error = B_ERROR;
|
||||||
|
Loading…
Reference in New Issue
Block a user