From: Lennart Poettering Date: Fri, 6 Sep 2024 09:12:35 +0000 (+0200) Subject: uki: add new ".profile" PE section type X-Git-Tag: v257-rc1~537^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c334b9912aaa2c9c1320d3cefc31a6706f0ff986;p=thirdparty%2Fsystemd.git uki: add new ".profile" PE section type This is the most basic preparatory work for supporting multi-profile UKIs. (This temporarily drops an assert_cc() check which we'll address in the next commit) --- diff --git a/src/boot/measure.c b/src/boot/measure.c index 81f1a9fbd2a..b7508edf65b 100644 --- a/src/boot/measure.c +++ b/src/boot/measure.c @@ -188,7 +188,7 @@ static int parse_argv(int argc, char *argv[]) { assert(argv); /* Make sure the arguments list and the section list, stays in sync */ - assert_cc(_ARG_SECTION_FIRST + _UNIFIED_SECTION_MAX == _ARG_SECTION_LAST + 1); + //assert_cc(_ARG_SECTION_FIRST + _UNIFIED_SECTION_MAX == _ARG_SECTION_LAST + 1); while ((c = getopt_long(argc, argv, "hjc", options, NULL)) >= 0) switch (c) { diff --git a/src/fundamental/uki.c b/src/fundamental/uki.c index 3887bf57023..da5da1cf106 100644 --- a/src/fundamental/uki.c +++ b/src/fundamental/uki.c @@ -20,5 +20,6 @@ const char* const unified_sections[_UNIFIED_SECTION_MAX + 1] = { [UNIFIED_SECTION_SBAT] = ".sbat", [UNIFIED_SECTION_PCRSIG] = ".pcrsig", [UNIFIED_SECTION_PCRPKEY] = ".pcrpkey", + [UNIFIED_SECTION_PROFILE] = ".profile", NULL, }; diff --git a/src/fundamental/uki.h b/src/fundamental/uki.h index 8ab742dd58f..653fd2e6166 100644 --- a/src/fundamental/uki.h +++ b/src/fundamental/uki.h @@ -17,6 +17,7 @@ typedef enum UnifiedSection { UNIFIED_SECTION_SBAT, UNIFIED_SECTION_PCRSIG, UNIFIED_SECTION_PCRPKEY, + UNIFIED_SECTION_PROFILE, _UNIFIED_SECTION_MAX, } UnifiedSection;