From a776284dfacace6f6b664f00b50c4bdd9301a51b Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 28 Aug 2017 06:01:11 -0400 Subject: [PATCH] Having a mounted partition should not disqualify the entire device. FIXES #780 (should reopen #639 for double-checking) --- src/modules/partition/core/DeviceList.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/partition/core/DeviceList.cpp b/src/modules/partition/core/DeviceList.cpp index 0b89fd986..5bce4a0e3 100644 --- a/src/modules/partition/core/DeviceList.cpp +++ b/src/modules/partition/core/DeviceList.cpp @@ -52,8 +52,9 @@ hasRootPartition( Device* device ) return false; } +/* Unused */ static bool -isMounted( Device* device ) +hasMountedPartitions( Device* device ) { cDebug() << "Checking for mounted partitions in" << device->deviceNode(); for ( auto it = PartitionIterator::begin( device ); it != PartitionIterator::end( device ); ++it ) @@ -128,8 +129,7 @@ QList< Device* > getDevices( DeviceType which, qint64 minimumSize ) } else if ( writableOnly && ( hasRootPartition( *it ) || - isIso9660( *it ) || - isMounted( *it ) ) + isIso9660( *it ) ) ) { cDebug() << " .. Removing" << it;