Make the partition ID check more flexible, if partitions just pop up out of

nowhere, we still want to be able to automount them, even though the
notification is not for a device.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30720 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus
2009-05-12 18:35:31 +00:00
parent be5788f81c
commit 0c7085458e
+7 -1
View File
@@ -200,9 +200,15 @@ AutoMounter::_MountVolumes(mount_mode normal, mount_mode removable,
{
if (fOnlyOnDeviceID >= 0) {
// only mount partitions on the given device id
// or if the partition ID is already matched
BPartition* device = partition;
while (device->Parent() != NULL)
while (device->Parent() != NULL) {
if (device->ID() == fOnlyOnDeviceID) {
// we are happy
break;
}
device = device->Parent();
}
if (device->ID() != fOnlyOnDeviceID)
return false;
}