[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;
|
args << devicePath << mountPoint;
|
||||||
|
|
||||||
auto r = CalamaresUtils::System::runCommand( args, 10 );
|
auto r = CalamaresUtils::System::runCommand( args, std::chrono::seconds( 10 ) );
|
||||||
sync();
|
sync();
|
||||||
return r.getExitCode();
|
return r.getExitCode();
|
||||||
}
|
}
|
||||||
@ -86,7 +86,8 @@ mount( const QString& devicePath, const QString& mountPoint, const QString& file
|
|||||||
int
|
int
|
||||||
unmount( const QString& path, const QStringList& options )
|
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();
|
sync();
|
||||||
return r.getExitCode();
|
return r.getExitCode();
|
||||||
}
|
}
|
||||||
|
@ -24,13 +24,13 @@
|
|||||||
void
|
void
|
||||||
CalamaresUtils::Partition::sync()
|
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 )
|
if ( r.getExitCode() != 0 )
|
||||||
{
|
{
|
||||||
cWarning() << "Could not settle disks.";
|
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
|
* Runs the given command-line @p args in the host in the current direcory
|
||||||
* with no input, and the given @p timeoutSec for completion.
|
* with no input, and the given @p timeoutSec for completion.
|
||||||
*/
|
*/
|
||||||
static inline ProcessResult runCommand(
|
static inline ProcessResult runCommand( const QStringList& args, std::chrono::seconds timeoutSec )
|
||||||
const QStringList& args,
|
|
||||||
int timeoutSec )
|
|
||||||
{
|
{
|
||||||
return runCommand( RunLocation::RunInHost, args, QString(), QString(), timeoutSec );
|
return runCommand( RunLocation::RunInHost, args, QString(), QString(), timeoutSec );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user