Clear swap partitions after swapoffing them.
This commit is contained in:
parent
f54ab5b3f5
commit
91cf3950df
@ -156,7 +156,13 @@ ClearMountsJob::tryUmount( const QString& partPath )
|
||||
process.start( "swapoff", { partPath } );
|
||||
process.waitForFinished();
|
||||
if ( process.exitCode() == 0 )
|
||||
return QString( "Successfully disabled swap %1." ).arg( partPath );
|
||||
{
|
||||
process.start( "mkswap", { partPath } );
|
||||
process.waitForFinished();
|
||||
if ( process.exitCode() == 0 )
|
||||
return QString( "Successfully disabled and cleared swap %1." ).arg( partPath );
|
||||
return QString( "Successfully disabled but not cleared swap %1." ).arg( partPath );
|
||||
}
|
||||
|
||||
return QString();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user