Correctly showing Software RAID device partition table.
This commit is contained in:
parent
c03c0ddc15
commit
04a5e2914d
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue