Merge branch 'master' into sfdisk

This commit is contained in:
Andrius Štikonas 2017-12-06 00:41:19 +00:00
commit 0bfb7094df
2 changed files with 3 additions and 2 deletions

View File

@ -113,8 +113,6 @@ public:
return m_Backup;
}
CommandSupportType supportSetLabel() const override {
if (!m_isCryptOpen)
return cmdSupportNone;
if (m_Check && m_innerFs)
return m_innerFs->supportSetLabel();
return cmdSupportNone;

View File

@ -67,7 +67,10 @@ bool SetPartFlagsJob::run(Report& parent)
for (const auto &f : PartitionTable::flagList()) {
emit progress(++count);
const bool oldState = (partition().activeFlags() & f) ? true : false;
const bool state = (flags() & f) ? true : false;
if (oldState == state)
continue;
if (!backendPartitionTable->setFlag(*report, partition(), f, state)) {
report->line() << xi18nc("@info:progress", "There was an error setting flag %1 for partition <filename>%2</filename> to state %3.", PartitionTable::flagName(f), partition().deviceNode(), state ? xi18nc("@info:progress flag turned on, active", "on") : xi18nc("@info:progress flag turned off, inactive", "off"));