[libcalamares] Chase API change (timeouts)
- The new mount service needed adjustment for the independent change of timeouts: int -> chrono::seconds.
This commit is contained in:
parent
f6d89354a1
commit
23a957e783
@ -78,7 +78,7 @@ mount( const QString& devicePath, const QString& mountPoint, const QString& file
|
||||
}
|
||||
args << devicePath << mountPoint;
|
||||
|
||||
auto r = CalamaresUtils::System::runCommand( args, 10 );
|
||||
auto r = CalamaresUtils::System::runCommand( args, std::chrono::seconds( 10 ) );
|
||||
sync();
|
||||
return r.getExitCode();
|
||||
}
|
||||
@ -86,7 +86,8 @@ mount( const QString& devicePath, const QString& mountPoint, const QString& file
|
||||
int
|
||||
unmount( const QString& path, const QStringList& options )
|
||||
{
|
||||
auto r = CalamaresUtils::System::runCommand( QStringList { "umount" } << options << path, 10 );
|
||||
auto r
|
||||
= CalamaresUtils::System::runCommand( QStringList { "umount" } << options << path, std::chrono::seconds( 10 ) );
|
||||
sync();
|
||||
return r.getExitCode();
|
||||
}
|
||||
|
@ -24,13 +24,13 @@
|
||||
void
|
||||
CalamaresUtils::Partition::sync()
|
||||
{
|
||||
auto r = CalamaresUtils::System::runCommand( { "/sbin/udevadm", "settle" }, 10 );
|
||||
auto r = CalamaresUtils::System::runCommand( { "/sbin/udevadm", "settle" }, std::chrono::seconds( 10 ) );
|
||||
|
||||
if ( r.getExitCode() != 0 )
|
||||
{
|
||||
cWarning() << "Could not settle disks.";
|
||||
r.explainProcess( "udevadm", 10 );
|
||||
r.explainProcess( "udevadm", std::chrono::seconds( 10 ) );
|
||||
}
|
||||
|
||||
CalamaresUtils::System::runCommand( { "/bin/sync" }, 10 );
|
||||
CalamaresUtils::System::runCommand( { "/bin/sync" }, std::chrono::seconds( 10 ) );
|
||||
}
|
||||
|
@ -140,9 +140,7 @@ public:
|
||||
* Runs the given command-line @p args in the host in the current direcory
|
||||
* with no input, and the given @p timeoutSec for completion.
|
||||
*/
|
||||
static inline ProcessResult runCommand(
|
||||
const QStringList& args,
|
||||
int timeoutSec )
|
||||
static inline ProcessResult runCommand( const QStringList& args, std::chrono::seconds timeoutSec )
|
||||
{
|
||||
return runCommand( RunLocation::RunInHost, args, QString(), QString(), timeoutSec );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user