From 5e144a360c6a30a11fc3d647cc1dc298ee6c41bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Thu, 4 Mar 2010 09:53:32 +0000 Subject: [PATCH] I don't know what recent change may have caused this, but I had to introduce the check to avoid a division by zero when scanning my partition map in order to be able to boot. I cannot spot any regressions, I can still access all my partitions just fine. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35757 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/partitioning_systems/intel/PartitionMap.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/add-ons/kernel/partitioning_systems/intel/PartitionMap.cpp b/src/add-ons/kernel/partitioning_systems/intel/PartitionMap.cpp index 5ae0e5a14e..8a4e70a297 100644 --- a/src/add-ons/kernel/partitioning_systems/intel/PartitionMap.cpp +++ b/src/add-ons/kernel/partitioning_systems/intel/PartitionMap.cpp @@ -361,6 +361,8 @@ Partition::Unset() bool Partition::CheckLocation(off_t sessionSize) const { + if (fBlockSize == 0) + return false; // offsets and size must be block aligned, partition table and partition must // lie within the session if (fPartitionTableOffset % fBlockSize != 0) {