Debug output.
This commit is contained in:
parent
cf5e137947
commit
fff0f6f023
@ -25,6 +25,7 @@
|
|||||||
#include <core/PartitionIterator.h>
|
#include <core/PartitionIterator.h>
|
||||||
#include <core/PMUtils.h>
|
#include <core/PMUtils.h>
|
||||||
#include "Branding.h"
|
#include "Branding.h"
|
||||||
|
#include "utils/Logger.h"
|
||||||
|
|
||||||
// CalaPM
|
// CalaPM
|
||||||
#include <core/device.h>
|
#include <core/device.h>
|
||||||
@ -43,6 +44,7 @@ static const char* UUID_DIR = "/dev/disk/by-uuid";
|
|||||||
static UuidForPartitionHash
|
static UuidForPartitionHash
|
||||||
findPartitionUuids()
|
findPartitionUuids()
|
||||||
{
|
{
|
||||||
|
cDebug() << "Gathering UUIDs for partitions that exist now.";
|
||||||
QDir dir( UUID_DIR );
|
QDir dir( UUID_DIR );
|
||||||
UuidForPartitionHash hash;
|
UuidForPartitionHash hash;
|
||||||
for ( auto info : dir.entryInfoList( QDir::Files ) )
|
for ( auto info : dir.entryInfoList( QDir::Files ) )
|
||||||
@ -51,6 +53,7 @@ findPartitionUuids()
|
|||||||
QString path = info.canonicalFilePath();
|
QString path = info.canonicalFilePath();
|
||||||
hash.insert( path, uuid );
|
hash.insert( path, uuid );
|
||||||
}
|
}
|
||||||
|
cDebug() << hash;
|
||||||
return hash;
|
return hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,6 +65,10 @@ mapForPartition( Partition* partition, const QString& uuid )
|
|||||||
map[ "mountPoint" ] = PartitionInfo::mountPoint( partition );
|
map[ "mountPoint" ] = PartitionInfo::mountPoint( partition );
|
||||||
map[ "fs" ] = partition->fileSystem().name();
|
map[ "fs" ] = partition->fileSystem().name();
|
||||||
map[ "uuid" ] = uuid;
|
map[ "uuid" ] = uuid;
|
||||||
|
cDebug() << partition->partitionPath()
|
||||||
|
<< "mtpoint:" << PartitionInfo::mountPoint( partition )
|
||||||
|
<< "fs:" << partition->fileSystem().name()
|
||||||
|
<< uuid;
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -151,9 +158,15 @@ FillGlobalStorageJob::createPartitionList() const
|
|||||||
{
|
{
|
||||||
UuidForPartitionHash hash = findPartitionUuids();
|
UuidForPartitionHash hash = findPartitionUuids();
|
||||||
QVariantList lst;
|
QVariantList lst;
|
||||||
|
cDebug() << "Writing to GlobalStorage[\"partitions\"]";
|
||||||
for ( auto device : m_devices )
|
for ( auto device : m_devices )
|
||||||
for ( auto it = PartitionIterator::begin( device ); it != PartitionIterator::end( device ); ++it )
|
{
|
||||||
|
for ( auto it = PartitionIterator::begin( device );
|
||||||
|
it != PartitionIterator::end( device ); ++it )
|
||||||
|
{
|
||||||
lst << mapForPartition( *it, hash.value( ( *it )->partitionPath() ) );
|
lst << mapForPartition( *it, hash.value( ( *it )->partitionPath() ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
return lst;
|
return lst;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user