Exclude zram from devices list.

main
Teo Mrnjavac 9 years ago
parent 608a51b3bc
commit 167b4fc0a2

@ -112,11 +112,12 @@ void
PartitionCoreModule::init() PartitionCoreModule::init()
{ {
CoreBackend* backend = CoreBackendManager::self()->backend(); CoreBackend* backend = CoreBackendManager::self()->backend();
auto devices = backend->scanDevices( true ); QList< Device* > devices = backend->scanDevices( true );
// Remove the device which contains / from the list // Remove the device which contains / from the list
for ( auto it = devices.begin(); it != devices.end(); ) for ( QList< Device* >::iterator it = devices.begin(); it != devices.end(); )
if ( hasRootPartition( *it ) ) if ( hasRootPartition( *it ) ||
(*it)->deviceNode().startsWith( "/dev/zram") )
it = devices.erase( it ); it = devices.erase( it );
else else
++it; ++it;

Loading…
Cancel
Save