From cbb077ffbd608c017c0d62c5a537083633f25834 Mon Sep 17 00:00:00 2001 From: Chantara Tith Date: Mon, 25 Jul 2016 01:00:28 +0700 Subject: [PATCH] House-cleaning and removing irrelevant TODO. --- src/core/partitionalignment.cpp | 2 -- src/jobs/createpartitionjob.cpp | 2 -- src/jobs/deletefilesystemjob.cpp | 1 - src/jobs/movephysicalvolumejob.cpp | 2 -- src/jobs/resizevolumegroupjob.cpp | 1 - src/jobs/setpartgeometryjob.cpp | 2 +- 6 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/core/partitionalignment.cpp b/src/core/partitionalignment.cpp index 9762a25..e38c569 100644 --- a/src/core/partitionalignment.cpp +++ b/src/core/partitionalignment.cpp @@ -33,7 +33,6 @@ int PartitionAlignment::s_sectorAlignment = 2048; qint64 PartitionAlignment::firstDelta(const Device& d, const Partition& p, qint64 s) { - //TODO: make sure things work for LVM if (d.partitionTable()->type() == PartitionTable::msdos) { const DiskDevice& diskDevice = dynamic_cast(d); if (p.roles().has(PartitionRole::Logical) && s == 2 * diskDevice.sectorsPerTrack()) @@ -53,7 +52,6 @@ qint64 PartitionAlignment::lastDelta(const Device& d, const Partition&, qint64 s bool PartitionAlignment::isLengthAligned(const Device& d, const Partition& p) { - //TODO: make sure things work for LVM if (d.partitionTable()->type() == PartitionTable::msdos) { const DiskDevice& diskDevice = dynamic_cast(d); if (p.roles().has(PartitionRole::Logical) && p.firstSector() == 2 * diskDevice.sectorsPerTrack()) diff --git a/src/jobs/createpartitionjob.cpp b/src/jobs/createpartitionjob.cpp index 886ffb1..51a21f7 100644 --- a/src/jobs/createpartitionjob.cpp +++ b/src/jobs/createpartitionjob.cpp @@ -78,8 +78,6 @@ bool CreatePartitionJob::run(Report& parent) LvmDevice& dev = dynamic_cast(device()); partition().setState(Partition::StateNone); - //TODO: take lvname from createDialog. - // find a better way to do this.now, we're assuming that partitionPath is already set, so we get the name from the path QString partPath = partition().partitionPath(); QString lvname = partPath.right(partPath.length() - partPath.lastIndexOf(QStringLiteral("/")) - 1); rval = LvmDevice::createLV(*report, dev, partition(), lvname); diff --git a/src/jobs/deletefilesystemjob.cpp b/src/jobs/deletefilesystemjob.cpp index 6853420..01edab6 100644 --- a/src/jobs/deletefilesystemjob.cpp +++ b/src/jobs/deletefilesystemjob.cpp @@ -66,7 +66,6 @@ bool DeleteFileSystemJob::run(Report& parent) if (partition().roles().has(PartitionRole::Extended)) { rval = true; } else if (device().type() == Device::LVM_Device) { - //TODO: LVM delete Filesystem Job. libparted can't help us here. rval = true; } else { diff --git a/src/jobs/movephysicalvolumejob.cpp b/src/jobs/movephysicalvolumejob.cpp index 6c945f4..ff4f220 100644 --- a/src/jobs/movephysicalvolumejob.cpp +++ b/src/jobs/movephysicalvolumejob.cpp @@ -40,8 +40,6 @@ bool MovePhysicalVolumeJob::run(Report& parent) Report* report = jobStarted(parent); - //TODO:check that the provided list is legal - QStringList destinations = LvmDevice::getPVs(device().name()); foreach (QString partPath, partList()) { if (destinations.contains(partPath)) { diff --git a/src/jobs/resizevolumegroupjob.cpp b/src/jobs/resizevolumegroupjob.cpp index 77dd4a2..d361bea 100644 --- a/src/jobs/resizevolumegroupjob.cpp +++ b/src/jobs/resizevolumegroupjob.cpp @@ -41,7 +41,6 @@ bool ResizeVolumeGroupJob::run(Report& parent) Report* report = jobStarted(parent); - //TODO:check that the provided list is legal foreach (QString pvpath, partList()) { if (type() == ResizeVolumeGroupJob::Grow) { rval = LvmDevice::insertPV(*report, device(), pvpath); diff --git a/src/jobs/setpartgeometryjob.cpp b/src/jobs/setpartgeometryjob.cpp index 90ee232..6de3c62 100644 --- a/src/jobs/setpartgeometryjob.cpp +++ b/src/jobs/setpartgeometryjob.cpp @@ -79,7 +79,7 @@ bool SetPartGeometryJob::run(Report& parent) report->line() << xi18nc("@info:progress", "Could not open device %1 while trying to resize/move partition %2.", device().deviceNode(), partition().deviceNode()); } else if (device().type() == Device::LVM_Device) { LvmDevice& dev = dynamic_cast(device()); - //TODO: resize given LVM LV + partition().setFirstSector(newStart()); partition().setLastSector(newStart() + newLength() - 1);