From 0f38ee624ec77a4c8091bb53385a6fccf337d785 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 4 Nov 2020 09:59:35 +0100 Subject: [PATCH] [partition] static-assert that our shortcut makes sense --- src/modules/partition/core/PartUtils.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/modules/partition/core/PartUtils.cpp b/src/modules/partition/core/PartUtils.cpp index 5cd68c5bf..92bcbace0 100644 --- a/src/modules/partition/core/PartUtils.cpp +++ b/src/modules/partition/core/PartUtils.cpp @@ -444,6 +444,7 @@ isEfiBootable( const Partition* candidate ) // TODO: with KPMCore 4, this comment is wrong: the flags // are remapped, and the ESP flag is the same as Boot. #if defined( WITH_KPMCORE4API ) + static_assert( KPM_PARTITION_FLAG_ESP == KPM_PARTITION_FLAG( Boot ), "KPMCore API enum changed" ); return flags.testFlag( KPM_PARTITION_FLAG_ESP ); #else /* If bit 17 is set, old-style Esp flag, it's OK */