[libcalamares] Expand API to allow clearing out the filesystem use

This commit is contained in:
Adriaan de Groot 2021-02-08 15:05:24 +01:00
parent 9665af0e5a
commit 10bec1d970
2 changed files with 15 additions and 0 deletions

View File

@ -45,3 +45,12 @@ CalamaresUtils::Partition::useFilesystemGS( Calamares::GlobalStorage* gs, const
gs->insert( fsUse_key, existingMap );
}
}
void
CalamaresUtils::Partition::clearFilesystemGS( Calamares::GlobalStorage* gs )
{
if ( gs )
{
gs->remove( fsUse_key );
}
}

View File

@ -52,6 +52,12 @@ void DLLEXPORT useFilesystemGS( Calamares::GlobalStorage* gs, const QString& fil
*/
bool DLLEXPORT isFilesystemUsedGS( const Calamares::GlobalStorage* gs, const QString& filesystemType );
/** @brief Clears the usage data for filesystems
*
* This removes the internal key *filesystem_use*.
*/
void DLLEXPORT clearFilesystemGS( Calamares::GlobalStorage* gs );
/** @brief Convenience function for using "the" Global Storage
*
* @see useFilesystemGS(const QString&, bool)