Commit 3f562ab0 authored by Andrius Štikonas's avatar Andrius Štikonas

Allow reading LUKS label.

parent e49a2669
......@@ -315,7 +315,7 @@ bool luks::cryptClose(const QString& deviceNode)
m_innerFs = nullptr;
m_passphrase.clear();
setLabel({});
setLabel(FileSystem::readLabel(deviceNode));
setUUID(readUUID(deviceNode));
setSectorsUsed(-1);
......@@ -468,11 +468,12 @@ QString luks::suggestedMapperName(const QString& deviceNode) const
return QStringLiteral("luks-") + readOuterUUID(deviceNode);
}
QString luks::readLabel(const QString&) const
QString luks::readLabel(const QString& deviceNode) const
{
if (m_isCryptOpen && m_innerFs)
return m_innerFs->readLabel(mapperName());
return QString();
return FileSystem::readLabel(deviceNode);
}
bool luks::writeLabel(Report& report, const QString&, const QString& newLabel)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment