* VisitEachPartition() was not working correctly, terminatedEarly was not
maintained git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23292 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -212,8 +212,13 @@ BDiskDeviceRoster::VisitEachPartition(BDiskDeviceVisitor *visitor,
|
|||||||
BDiskDevice deviceOnStack;
|
BDiskDevice deviceOnStack;
|
||||||
BDiskDevice *useDevice = (device ? device : &deviceOnStack);
|
BDiskDevice *useDevice = (device ? device : &deviceOnStack);
|
||||||
BPartition *foundPartition = NULL;
|
BPartition *foundPartition = NULL;
|
||||||
while (!foundPartition && GetNextDevice(useDevice) == B_OK)
|
while (GetNextDevice(useDevice) == B_OK) {
|
||||||
foundPartition = useDevice->VisitEachDescendant(visitor);
|
foundPartition = useDevice->VisitEachDescendant(visitor);
|
||||||
|
if (foundPartition) {
|
||||||
|
terminatedEarly = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
fDeviceCookie = oldCookie;
|
fDeviceCookie = oldCookie;
|
||||||
if (!terminatedEarly)
|
if (!terminatedEarly)
|
||||||
useDevice->Unset();
|
useDevice->Unset();
|
||||||
|
|||||||
Reference in New Issue
Block a user