From: Tobias Heider Date: Sun, 10 Aug 2025 14:27:46 +0000 (+0200) Subject: chid: don't hardcode magic numbers for non-official CHIDs X-Git-Tag: v258-rc3~57 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5a64f158ec8573b33e77a3b345646552979b07f0;p=thirdparty%2Fsystemd.git chid: don't hardcode magic numbers for non-official CHIDs They are constructed from EXTRA_CHID_BASE + offset --- diff --git a/src/boot/chid.c b/src/boot/chid.c index 74be7d594f3..28f2b7b8984 100644 --- a/src/boot/chid.c +++ b/src/boot/chid.c @@ -105,7 +105,8 @@ EFI_STATUS chid_match(const void *hwid_buffer, size_t hwid_length, uint32_t matc const Device *devices = ASSERT_PTR(hwid_buffer); EFI_GUID chids[CHID_TYPES_MAX] = {}; - static const size_t priority[] = { 17, 16, 15, 3, 6, 8, 10, 4, 5, 7, 9, 11 }; /* From most to least specific. */ + static const size_t priority[] = { EXTRA_CHID_BASE + 2, EXTRA_CHID_BASE + 1, EXTRA_CHID_BASE + 0, + 3, 6, 8, 10, 4, 5, 7, 9, 11 }; /* From most to least specific. */ status = populate_board_chids(chids); if (EFI_STATUS_IS_ERROR(status))