We no longer need to fill partition sizes. KPMCore now tracks max fs size (including inside luks).
This commit is contained in:
parent
c291af2c83
commit
82243234e3
|
@ -145,8 +145,8 @@ bool btrfs::resize(Report& report, const QString& deviceNode, qint64 length) con
|
|||
{ QStringLiteral("--verbose"), QStringLiteral("--types"), QStringLiteral("btrfs"), deviceNode, tempDir.path() });
|
||||
|
||||
if (mountCmd.run(-1) && mountCmd.exitCode() == 0) {
|
||||
QString len = length == -1 ? QStringLiteral("max") : QString::number(length);
|
||||
ExternalCommand resizeCmd(report, QStringLiteral("btrfs"), { QStringLiteral("filesystem"), QStringLiteral("resize"), len, tempDir.path() });
|
||||
ExternalCommand resizeCmd(report, QStringLiteral("btrfs"),
|
||||
{ QStringLiteral("filesystem"), QStringLiteral("resize"), QString::number(length), tempDir.path() });
|
||||
|
||||
if (resizeCmd.run(-1) && resizeCmd.exitCode() == 0)
|
||||
rval = true;
|
||||
|
|
|
@ -137,9 +137,8 @@ bool ext2::create(Report& report, const QString& deviceNode) const
|
|||
bool ext2::resize(Report& report, const QString& deviceNode, qint64 length) const
|
||||
{
|
||||
const QString len = QString::number(length / 512) + QStringLiteral("s");
|
||||
const QStringList args = length == -1 ? QStringList() << deviceNode : QStringList() << deviceNode << len;
|
||||
|
||||
ExternalCommand cmd(report, QStringLiteral("resize2fs"), args);
|
||||
ExternalCommand cmd(report, QStringLiteral("resize2fs"), { deviceNode, len });
|
||||
return cmd.run(-1) && cmd.exitCode() == 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -148,10 +148,8 @@ bool reiserfs::create(Report& report, const QString& deviceNode) const
|
|||
|
||||
bool reiserfs::resize(Report& report, const QString& deviceNode, qint64 length) const
|
||||
{
|
||||
const QStringList args = length == -1 ?
|
||||
QStringList() << deviceNode << QStringLiteral("-q") :
|
||||
QStringList() << deviceNode << QStringLiteral("-q") << QStringLiteral("-s") << QString::number(length);
|
||||
ExternalCommand cmd(report, QStringLiteral("resize_reiserfs"), args);
|
||||
ExternalCommand cmd(report, QStringLiteral("resize_reiserfs"),
|
||||
{ deviceNode, QStringLiteral("-q"), QStringLiteral("-s"), QString::number(length) });
|
||||
|
||||
bool rval = cmd.start(-1);
|
||||
|
||||
|
|
|
@ -30,8 +30,8 @@
|
|||
#include "jobs/resizefilesystemjob.h"
|
||||
|
||||
#include "fs/filesystem.h"
|
||||
#include "fs/luks.h"
|
||||
#include "fs/filesystemfactory.h"
|
||||
#include "fs/luks.h"
|
||||
|
||||
#include "util/capacity.h"
|
||||
#include "util/report.h"
|
||||
|
|
Loading…
Reference in New Issue