[partition]: fix cDebug() format

This commit is contained in:
Philip 2017-12-27 10:13:05 -05:00
parent c8b4e13a5b
commit 6e27e9af2b
2 changed files with 20 additions and 7 deletions

View File

@ -403,8 +403,9 @@ PartitionCoreModule::jobs() const
foreach ( auto job, lst )
jobsDebug.append( job->prettyName() );
cDebug() << "PartitionCodeModule has been asked for jobs. About to return:"
<< jobsDebug.join( "\n" );
cDebug() << "PartitionCodeModule has been asked for jobs. About to return:";
for ( const auto item: jobsDebug )
cDebug() << " .." << item;
return lst;
}
@ -427,9 +428,9 @@ PartitionCoreModule::dumpQueue() const
cDebug() << "# Queue:";
for ( auto info : m_deviceInfos )
{
cDebug() << "## Device:" << info->device->name();
cDebug() << " .. Device:" << info->device->name();
for ( auto job : info->jobs )
cDebug() << "-" << job->prettyName();
cDebug() << " .." << job->prettyName();
}
}

View File

@ -73,21 +73,33 @@ CreatePartitionTableJob::exec()
PartitionTable* table = m_device->partitionTable();
cDebug() << "Creating new partition table of type" << table->typeName()
<< ", uncommitted yet:\n" << table;
<< " - Uncommitted yet: " << table;
QProcess lsblk;
lsblk.setProgram( "lsblk" );
lsblk.setProcessChannelMode( QProcess::MergedChannels );
lsblk.start();
lsblk.waitForFinished();
cDebug() << "lsblk:\n" << lsblk.readAllStandardOutput();
QByteArray byte = lsblk.readAllStandardOutput();
QStringList lines = QString(byte).split(("\n"),QString::SkipEmptyParts);
cDebug() << "CreatePartitionTableJob asked for lsblk output:";
for (const auto line: lines)
cDebug() << " .." << line;
QProcess mount;
mount.setProgram( "mount" );
mount.setProcessChannelMode( QProcess::MergedChannels );
mount.start();
mount.waitForFinished();
cDebug() << "mount:\n" << mount.readAllStandardOutput();
QByteArray mbyte = mount.readAllStandardOutput();
QStringList mlines = QString(mbyte).split(("\n"),QString::SkipEmptyParts);
cDebug() << "CreatePartitionTableJob asked for mount output:";
for (const auto mline: mlines)
cDebug() << " .." << mline;
CreatePartitionTableOperation op(*m_device, table);
op.setStatus(Operation::StatusRunning);