Browse Source

Allow reading LUKS label.

raid-support v3.3.0
Andrius Štikonas 3 years ago
parent
commit
3f562ab0f0
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      src/fs/luks.cpp

+ 4
- 3
src/fs/luks.cpp View File

@ -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)


Loading…
Cancel
Save