Correctly showing Software RAID device partition table.

This commit is contained in:
Caio Carvalho 2018-07-10 19:09:22 -03:00
parent c03c0ddc15
commit 04a5e2914d
2 changed files with 2 additions and 2 deletions

View File

@ -295,7 +295,7 @@ bool PartitionTable::getUnallocatedRange(const Device& d, PartitionNode& parent,
}
return end - start + 1 >= PartitionAlignment::sectorAlignment(device);
} else if (d.type() == Device::Type::LVM_Device) {
} else if (d.type() == Device::Type::LVM_Device || d.type() == Device::Type::SoftwareRAID_Device) {
if (end - start + 1 > 0) {
return true;
}

View File

@ -130,7 +130,7 @@ qint64 SoftwareRAID::getChunkSize(const QString &path)
QRegularExpression re(QStringLiteral("Chunk Size :\\s+(\\d+)"));
QRegularExpressionMatch reMatch = re.match(output);
if (reMatch.hasMatch())
return reMatch.captured(1).toLongLong() * 1024;
return reMatch.captured(1).toLongLong();
}
return -1;