[partition] Improve partition-UUID logging.
This commit is contained in:
parent
5b936f33ec
commit
4757496c3d
@ -56,9 +56,12 @@ findPartitionUuids( QList < Device* > devices )
|
|||||||
QString path = p->partitionPath();
|
QString path = p->partitionPath();
|
||||||
QString uuid = p->fileSystem().readUUID( p->partitionPath() );
|
QString uuid = p->fileSystem().readUUID( p->partitionPath() );
|
||||||
hash.insert( path, uuid );
|
hash.insert( path, uuid );
|
||||||
|
cDebug() << ".. added path=" << path << "UUID=" << uuid;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cDebug() << hash;
|
|
||||||
|
if ( hash.isEmpty() )
|
||||||
|
cDebug() << ".. no UUIDs found.";
|
||||||
return hash;
|
return hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,10 +93,16 @@ mapForPartition( Partition* partition, const QString& uuid )
|
|||||||
dynamic_cast< FS::luks& >( partition->fileSystem() ).innerFS() )
|
dynamic_cast< FS::luks& >( partition->fileSystem() ).innerFS() )
|
||||||
map[ "fs" ] = dynamic_cast< FS::luks& >( partition->fileSystem() ).innerFS()->name();
|
map[ "fs" ] = dynamic_cast< FS::luks& >( partition->fileSystem() ).innerFS()->name();
|
||||||
map[ "uuid" ] = uuid;
|
map[ "uuid" ] = uuid;
|
||||||
cDebug() << partition->partitionPath()
|
|
||||||
<< "mtpoint:" << PartitionInfo::mountPoint( partition )
|
// Debugging for inside the loop in createPartitionList(),
|
||||||
<< "fs:" << map[ "fs" ] << '(' << map[ "fsName" ] << ')'
|
// so indent a bit
|
||||||
<< uuid;
|
Logger::CLog deb = cDebug();
|
||||||
|
using TR = Logger::DebugRow<const char *const, const QString&>;
|
||||||
|
deb << " .. mapping for" << partition->partitionPath() << partition->deviceNode()
|
||||||
|
<< TR( "mtpoint:", PartitionInfo::mountPoint( partition ) )
|
||||||
|
<< TR( "fs:", map[ "fs" ].toString() )
|
||||||
|
<< TR( "fsname", map[ "fsName" ].toString() )
|
||||||
|
<< TR( "uuid", uuid );
|
||||||
|
|
||||||
if ( partition->roles().has( PartitionRole::Luks ) )
|
if ( partition->roles().has( PartitionRole::Luks ) )
|
||||||
{
|
{
|
||||||
@ -104,7 +113,7 @@ mapForPartition( Partition* partition, const QString& uuid )
|
|||||||
map[ "luksMapperName" ] = luksFs->mapperName().split( "/" ).last();
|
map[ "luksMapperName" ] = luksFs->mapperName().split( "/" ).last();
|
||||||
map[ "luksUuid" ] = getLuksUuid( partition->partitionPath() );
|
map[ "luksUuid" ] = getLuksUuid( partition->partitionPath() );
|
||||||
map[ "luksPassphrase" ] = luksFs->passphrase();
|
map[ "luksPassphrase" ] = luksFs->passphrase();
|
||||||
cDebug() << "luksMapperName:" << map[ "luksMapperName" ];
|
deb << TR( "luksMapperName:", map[ "luksMapperName" ].toString() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -215,9 +224,11 @@ FillGlobalStorageJob::createPartitionList() const
|
|||||||
cDebug() << "Writing to GlobalStorage[\"partitions\"]";
|
cDebug() << "Writing to GlobalStorage[\"partitions\"]";
|
||||||
for ( auto device : m_devices )
|
for ( auto device : m_devices )
|
||||||
{
|
{
|
||||||
|
cDebug() << ".. partitions on" << device->deviceNode();
|
||||||
for ( auto it = PartitionIterator::begin( device );
|
for ( auto it = PartitionIterator::begin( device );
|
||||||
it != PartitionIterator::end( device ); ++it )
|
it != PartitionIterator::end( device ); ++it )
|
||||||
{
|
{
|
||||||
|
// Debug-logging is done when creating the map
|
||||||
lst << mapForPartition( *it, hash.value( ( *it )->partitionPath() ) );
|
lst << mapForPartition( *it, hash.value( ( *it )->partitionPath() ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user