mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-25 16:38:21 -04:00
Merge branch 'master' into secureboot
This commit is contained in:
commit
cbd62fbeb1
296 changed files with 13052 additions and 9117 deletions
|
@ -1,6 +1,7 @@
|
|||
/* === This file is part of Calamares - <https://github.com/calamares> ===
|
||||
*
|
||||
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
|
||||
* Copyright 2018, Adriaan de Groot <groot@kde.org>
|
||||
*
|
||||
* Calamares is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -22,6 +23,7 @@
|
|||
|
||||
#include "core/DeviceModel.h"
|
||||
#include "core/KPMHelpers.h"
|
||||
#include "core/PartitionInfo.h"
|
||||
#include "core/PartitionIterator.h"
|
||||
|
||||
#include <kpmcore/backend/corebackend.h>
|
||||
|
@ -138,7 +140,6 @@ canBeResized( PartitionCoreModule* core, const QString& partitionPath )
|
|||
if ( partitionWithOs.startsWith( "/dev/" ) )
|
||||
{
|
||||
cDebug() << partitionWithOs << "seems like a good path";
|
||||
bool canResize = false;
|
||||
DeviceModel* dm = core->deviceModel();
|
||||
for ( int i = 0; i < dm->rowCount(); ++i )
|
||||
{
|
||||
|
@ -346,8 +347,10 @@ isEfiBootable( const Partition* candidate )
|
|||
cDebug() << "Check EFI bootable" << candidate->partitionPath() << candidate->devicePath();
|
||||
cDebug() << " .. flags" << candidate->activeFlags();
|
||||
|
||||
auto flags = PartitionInfo::flags( candidate );
|
||||
|
||||
/* If bit 17 is set, old-style Esp flag, it's OK */
|
||||
if ( candidate->activeFlags().testFlag( PartitionTable::FlagEsp ) )
|
||||
if ( flags.testFlag( PartitionTable::FlagEsp ) )
|
||||
return true;
|
||||
|
||||
/* Otherwise, if it's a GPT table, Boot (bit 0) is the same as Esp */
|
||||
|
@ -365,7 +368,7 @@ isEfiBootable( const Partition* candidate )
|
|||
const PartitionTable* table = dynamic_cast<const PartitionTable*>( root );
|
||||
cDebug() << " .. partition table" << (void *)table << "type" << ( table ? table->type() : PartitionTable::TableType::unknownTableType );
|
||||
return table && ( table->type() == PartitionTable::TableType::gpt ) &&
|
||||
candidate->activeFlags().testFlag( PartitionTable::FlagBoot );
|
||||
flags.testFlag( PartitionTable::FlagBoot );
|
||||
}
|
||||
|
||||
} // nmamespace PartUtils
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue