Initial work on storing LVM variables during initial scan.
This commit is contained in:
parent
19cd61dad0
commit
10a2aca527
|
@ -113,8 +113,8 @@ void InfoPane::showPartition(Qt::DockWidgetArea area, const Partition& p)
|
|||
|
||||
int x = 0;
|
||||
int y = createHeader(p.deviceNode(), cols(area));
|
||||
if (p.fileSystem().type() == FileSystem::Luks) {
|
||||
const FS::luks* luksFs = dynamic_cast<const FS::luks*>(&p.fileSystem());
|
||||
if (p.fileSystem().type() == FileSystem::Luks) { // inactive LUKS partition
|
||||
const FS::luks* luksFs = static_cast<const FS::luks*>(&p.fileSystem());
|
||||
QString deviceNode = p.partitionPath();
|
||||
createLabels(i18nc("@label partition", "File system:"), p.fileSystem().name(), cols(area), x, y);
|
||||
createLabels(i18nc("@label partition", "Capacity:"), Capacity::formatByteSize(p.capacity()), cols(area), x, y);
|
||||
|
@ -127,13 +127,15 @@ void InfoPane::showPartition(Qt::DockWidgetArea area, const Partition& p)
|
|||
createLabels(i18nc("@label partition", "Last sector:"), QLocale().toString(p.lastSector()), cols(area), x, y);
|
||||
createLabels(i18nc("@label partition", "Number of sectors:"), QLocale().toString(p.length()), cols(area), x, y);
|
||||
} else if (p.fileSystem().type() == FileSystem::Lvm2_PV) {
|
||||
const FS::lvm2_pv* lvm2PVFs = dynamic_cast<const FS::lvm2_pv*>(&p.fileSystem());
|
||||
const FS::lvm2_pv* lvm2PVFs = p.roles().has(PartitionRole::Luks) ?
|
||||
static_cast<const FS::lvm2_pv*>(static_cast<const FS::luks*>(&p.fileSystem())->innerFS()) : // LVM inside LUKS partition
|
||||
static_cast<const FS::lvm2_pv*>(&p.fileSystem()); // simple LVM
|
||||
QString deviceNode = p.partitionPath();
|
||||
createLabels(i18nc("@label partition", "File system:"), p.fileSystem().name(), cols(area), x, y);
|
||||
createLabels(i18nc("@label partition", "Capacity:"), Capacity::formatByteSize(p.capacity()), cols(area), x, y);
|
||||
createLabels(i18nc("@label partition", "Available:"), Capacity::formatByteSize(p.available()), cols(area), x, y);
|
||||
createLabels(i18nc("@label partition", "Used:"), Capacity::formatByteSize(p.used()), cols(area), x, y);
|
||||
createLabels(i18nc("@label partition", "PE Size:"), Capacity::formatByteSize(lvm2PVFs->getPESize(deviceNode)), cols(area), x, y);
|
||||
createLabels(i18nc("@label partition", "PE Size:"), Capacity::formatByteSize(lvm2PVFs->peSize()), cols(area), x, y);
|
||||
createLabels(i18nc("@label partition", "Total PE:"), QString::number(lvm2PVFs->getTotalPE(deviceNode)), cols(area), x, y);
|
||||
createLabels(i18nc("@label partition", "Free PE:"), QString::number(lvm2PVFs->getFreePE(deviceNode)), cols(area), x, y);
|
||||
createLabels(i18nc("@label partition", "Allocated PE:"), QString::number(lvm2PVFs->getAllocatedPE(deviceNode)), cols(area), x, y);
|
||||
|
|
Loading…
Reference in New Issue