[partition] Simplify debug calls to executables
- Use the Calamares support-functions for running lsblk and mount (these might need to have privilege support if Cala is not running as root, so this is future-proofing)
This commit is contained in:
parent
fdf0f208f0
commit
07354a26a9
@ -12,6 +12,7 @@
|
|||||||
#include "CreatePartitionTableJob.h"
|
#include "CreatePartitionTableJob.h"
|
||||||
|
|
||||||
#include "partition/PartitionIterator.h"
|
#include "partition/PartitionIterator.h"
|
||||||
|
#include "utils/CalamaresUtilsSystem.h"
|
||||||
#include "utils/Logger.h"
|
#include "utils/Logger.h"
|
||||||
|
|
||||||
#include "core/KPMHelpers.h"
|
#include "core/KPMHelpers.h"
|
||||||
@ -75,19 +76,11 @@ CreatePartitionTableJob::exec()
|
|||||||
cDebug() << Logger::SubEntry << ( ( *it ) ? ( *it )->deviceNode() : QString( "<null device>" ) );
|
cDebug() << Logger::SubEntry << ( ( *it ) ? ( *it )->deviceNode() : QString( "<null device>" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
QProcess lsblk;
|
auto lsblkResult = CalamaresUtils::System::runCommand( { "lsblk" }, std::chrono::seconds( 30 ) );
|
||||||
lsblk.setProgram( "lsblk" );
|
cDebug() << Logger::SubEntry << "lsblk output:\n" << Logger::NoQuote << lsblkResult.getOutput();
|
||||||
lsblk.setProcessChannelMode( QProcess::MergedChannels );
|
|
||||||
lsblk.start();
|
|
||||||
lsblk.waitForFinished();
|
|
||||||
cDebug() << Logger::SubEntry << "lsblk output:\n" << Logger::NoQuote << lsblk.readAllStandardOutput();
|
|
||||||
|
|
||||||
QProcess mount;
|
auto mountResult = CalamaresUtils::System::runCommand( { "mount" }, std::chrono::seconds( 30 ) );
|
||||||
mount.setProgram( "mount" ); // Debug output only, not mounting something
|
cDebug() << Logger::SubEntry << "mount output:\n" << Logger::NoQuote << mountResult.getOutput();
|
||||||
mount.setProcessChannelMode( QProcess::MergedChannels );
|
|
||||||
mount.start();
|
|
||||||
mount.waitForFinished();
|
|
||||||
cDebug() << Logger::SubEntry << "mount output:\n" << Logger::NoQuote << mount.readAllStandardOutput();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return KPMHelpers::execute(
|
return KPMHelpers::execute(
|
||||||
|
Loading…
Reference in New Issue
Block a user