Allow reading LUKS label.
This commit is contained in:
parent
e49a266922
commit
3f562ab0f0
|
@ -315,7 +315,7 @@ bool luks::cryptClose(const QString& deviceNode)
|
||||||
m_innerFs = nullptr;
|
m_innerFs = nullptr;
|
||||||
|
|
||||||
m_passphrase.clear();
|
m_passphrase.clear();
|
||||||
setLabel({});
|
setLabel(FileSystem::readLabel(deviceNode));
|
||||||
setUUID(readUUID(deviceNode));
|
setUUID(readUUID(deviceNode));
|
||||||
setSectorsUsed(-1);
|
setSectorsUsed(-1);
|
||||||
|
|
||||||
|
@ -468,11 +468,12 @@ QString luks::suggestedMapperName(const QString& deviceNode) const
|
||||||
return QStringLiteral("luks-") + readOuterUUID(deviceNode);
|
return QStringLiteral("luks-") + readOuterUUID(deviceNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString luks::readLabel(const QString&) const
|
QString luks::readLabel(const QString& deviceNode) const
|
||||||
{
|
{
|
||||||
if (m_isCryptOpen && m_innerFs)
|
if (m_isCryptOpen && m_innerFs)
|
||||||
return m_innerFs->readLabel(mapperName());
|
return m_innerFs->readLabel(mapperName());
|
||||||
return QString();
|
|
||||||
|
return FileSystem::readLabel(deviceNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool luks::writeLabel(Report& report, const QString&, const QString& newLabel)
|
bool luks::writeLabel(Report& report, const QString&, const QString& newLabel)
|
||||||
|
|
Loading…
Reference in New Issue