[partition] Remove some slowdown methods when debugging is off

- Running lsblk and mount for debugging purposes can be
   skipped when the debugging is going to be suppressed anyway.
   This will speed things up just a little for regular users.
This commit is contained in:
Adriaan de Groot 2018-10-05 08:45:10 -04:00
parent 74ab06e20a
commit bb586de056

View File

@ -85,6 +85,8 @@ CreatePartitionTableJob::exec()
cDebug() << "Creating new partition table of type" << table->typeName()
<< ", uncommitted yet:";
if ( Logger::logLevelEnabled( Logger::LOGDEBUG ) )
{
for ( auto it = PartitionIterator::begin( table );
it != PartitionIterator::end( table ); ++it )
cDebug() << *it;
@ -102,6 +104,7 @@ CreatePartitionTableJob::exec()
mount.start();
mount.waitForFinished();
cDebug() << "mount:\n" << mount.readAllStandardOutput();
}
CreatePartitionTableOperation op(*m_device, table);
op.setStatus(Operation::StatusRunning);