[partition] Handle partition flag FlagEsp post KPMCore 3.3.0
This commit is contained in:
parent
2a2795c54c
commit
68f29ebf20
@ -36,9 +36,11 @@ class PartitionRole;
|
|||||||
#ifdef WITH_KPMCOREGT33
|
#ifdef WITH_KPMCOREGT33
|
||||||
#define KPM_PARTITION_FLAG(x) PartitionTable::Flag::x
|
#define KPM_PARTITION_FLAG(x) PartitionTable::Flag::x
|
||||||
#define KPM_PARTITION_STATE(x) Partition::State::x
|
#define KPM_PARTITION_STATE(x) Partition::State::x
|
||||||
|
#define KPM_PARTITION_FLAG_ESP PartitionTable::Flag::Boot
|
||||||
#else
|
#else
|
||||||
#define KPM_PARTITION_FLAG(x) PartitionTable::Flag##x
|
#define KPM_PARTITION_FLAG(x) PartitionTable::Flag##x
|
||||||
#define KPM_PARTITION_STATE(x) Partition::State##x
|
#define KPM_PARTITION_STATE(x) Partition::State##x
|
||||||
|
#define KPM_PARTITION_FLAG_ESP PartitionTable::FlagEsp
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -407,7 +407,7 @@ isEfiBootable( const Partition* candidate )
|
|||||||
auto flags = PartitionInfo::flags( candidate );
|
auto flags = PartitionInfo::flags( candidate );
|
||||||
|
|
||||||
/* If bit 17 is set, old-style Esp flag, it's OK */
|
/* If bit 17 is set, old-style Esp flag, it's OK */
|
||||||
if ( flags.testFlag( PartitionTable::FlagEsp ) )
|
if ( flags.testFlag( KPM_PARTITION_FLAG_ESP ) )
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
/* Otherwise, if it's a GPT table, Boot (bit 0) is the same as Esp */
|
/* Otherwise, if it's a GPT table, Boot (bit 0) is the same as Esp */
|
||||||
|
@ -133,7 +133,7 @@ doAutopartition( PartitionCoreModule* core, Device* dev, Choices::AutoPartitionO
|
|||||||
);
|
);
|
||||||
PartitionInfo::setFormat( efiPartition, true );
|
PartitionInfo::setFormat( efiPartition, true );
|
||||||
PartitionInfo::setMountPoint( efiPartition, o.efiPartitionMountPoint );
|
PartitionInfo::setMountPoint( efiPartition, o.efiPartitionMountPoint );
|
||||||
core->createPartition( dev, efiPartition, PartitionTable::FlagEsp );
|
core->createPartition( dev, efiPartition, KPM_PARTITION_FLAG_ESP );
|
||||||
firstFreeSector = lastSector + 1;
|
firstFreeSector = lastSector + 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user