From: Emil Velikov Date: Thu, 21 Nov 2024 09:15:36 +0000 (+0000) Subject: libkmod: expand the deprecated/0xB007FA57 comment X-Git-Tag: v34~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cef202d48f5da2d910420c2acdd219c0736d94da;p=thirdparty%2Fkmod.git libkmod: expand the deprecated/0xB007FA57 comment Provide a summary how the magic and version fields have evolved. It serves as better reference than the current "deprecated versions" note. Signed-off-by: Emil Velikov Link: https://github.com/kmod-project/kmod/pull/256 Signed-off-by: Lucas De Marchi --- diff --git a/libkmod/libkmod-index.c b/libkmod/libkmod-index.c index 19d4cc3f..40199a54 100644 --- a/libkmod/libkmod-index.c +++ b/libkmod/libkmod-index.c @@ -27,7 +27,13 @@ * Integers are stored as 32 bit unsigned in "network" order, i.e. MSB first. * All files start with a magic number. * - * Magic spells "BOOTFAST". Deprecated versions encoded it as 0xB007FA57. + * Magic spells "BOOTFAST", where the exact encoding varies across versions. + * + * The original implementation in modutils/module-init-tools used 0xB007FA57, but also + * lacked the version fields. Thus later on, with module-init-tools commit 44d7ac4 + * ("add versioning to the binary module files"), the encoding was changed to 0xB007F457 + * (A -> 4) and the version fields were introduced. Shortly afterwards the format was + * changed in backwards incompatible way and the major version was bumped to 2. * * We use a version string to keep track of changes to the binary format. * This is stored in the form: INDEX_MAJOR (hi) INDEX_MINOR (lo) just in