Skip to content
Snippets Groups Projects
Unverified Commit fcef9661 authored by Adriaan de Groot's avatar Adriaan de Groot Committed by GitHub
Browse files

Merge pull request #2427 from JustTNE/patch-unmount-special

[parition] Do not unmount /dev/mapper/ventoy
parents 61ce8168 3994c880
No related branches found
No related tags found
No related merge requests found
...@@ -105,18 +105,20 @@ getSwapsForDevice( const QString& deviceName ) ...@@ -105,18 +105,20 @@ getSwapsForDevice( const QString& deviceName )
} }
static inline bool static inline bool
isControl( const QString& baseName ) isSpecial( const QString& baseName )
{
return baseName == "control";
}
static inline bool
isFedoraSpecial( const QString& baseName )
{ {
// Fedora live images use /dev/mapper/live-* internally. We must not // Fedora live images use /dev/mapper/live-* internally. We must not
// unmount those devices, because they are used by the live image and // unmount those devices, because they are used by the live image and
// because we need /dev/mapper/live-base in the unpackfs module. // because we need /dev/mapper/live-base in the unpackfs module.
return baseName.startsWith( "live-" ); if (baseName.startsWith( "live-" ))
return true;
// Exclude /dev/mapper/control
if (baseName == "control")
return true;
// When ventoy is used, ventoy uses the /dev/mapper/ventoy device. We
// must not unmount this device, because it is used by the live image
// and because we need /dev/mapper/ventoy in the unpackfs module.
return baseName == "ventoy";
} }
/** @brief Returns a list of unneeded crypto devices /** @brief Returns a list of unneeded crypto devices
...@@ -135,7 +137,7 @@ getCryptoDevices( const QStringList& mapperExceptions ) ...@@ -135,7 +137,7 @@ getCryptoDevices( const QStringList& mapperExceptions )
for ( const QFileInfo& fi : fiList ) for ( const QFileInfo& fi : fiList )
{ {
QString baseName = fi.baseName(); QString baseName = fi.baseName();
if ( isControl( baseName ) || isFedoraSpecial( baseName ) || mapperExceptions.contains( baseName ) ) if ( isSpecial( baseName ) || mapperExceptions.contains( baseName ) )
{ {
continue; continue;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment