Fix off-by-one error in createUnallocated() that would lead to free space of

the device's cylinder size between partitions being wasted.

svn path=/trunk/extragear/sysadmin/partitionmanager/; revision=908094
This commit is contained in:
Volker Lanz 2009-01-09 09:53:43 +00:00
parent 3c910d61cd
commit 85c0212ba3
1 changed files with 1 additions and 1 deletions

View File

@ -447,7 +447,7 @@ Partition* createUnallocated(const Device& device, PartitionNode& parent, qint64
r |= PartitionRole::Logical;
}
if (end - start < device.cylinderSize())
if (end - start + 1 < device.cylinderSize())
return NULL;
return new Partition(&parent, device, PartitionRole(r), FileSystemFactory::create(FileSystem::Unknown, start, end), start, end, -1);