Merge branch 'master' into sfdisk

This commit is contained in:
Andrius Štikonas 2017-12-24 23:38:39 +00:00
commit 97ccd8d154
1 changed files with 4 additions and 3 deletions

View File

@ -316,7 +316,7 @@ bool luks::cryptClose(const QString& deviceNode)
m_innerFs = nullptr;
m_passphrase.clear();
setLabel({});
setLabel(FileSystem::readLabel(deviceNode));
setUUID(readUUID(deviceNode));
setSectorsUsed(-1);
@ -469,11 +469,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)