Skip to content
Snippets Groups Projects
Commit 91cf3950 authored by Teo Mrnjavac's avatar Teo Mrnjavac
Browse files

Clear swap partitions after swapoffing them.

parent f54ab5b3
No related branches found
No related tags found
No related merge requests found
......@@ -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();
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment