diff --git a/src/libcalamares/partition/Global.cpp b/src/libcalamares/partition/Global.cpp index fbe775f11..fb7b09aaf 100644 --- a/src/libcalamares/partition/Global.cpp +++ b/src/libcalamares/partition/Global.cpp @@ -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 ); + } +} diff --git a/src/libcalamares/partition/Global.h b/src/libcalamares/partition/Global.h index 960e302d0..733e2f69c 100644 --- a/src/libcalamares/partition/Global.h +++ b/src/libcalamares/partition/Global.h @@ -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)