]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
docs: use native type instead of byte stream in COREDUMP_PACKAGE_METADATA
authorLuca Boccassi <bluca@debian.org>
Mon, 28 Mar 2022 10:33:37 +0000 (11:33 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 28 Mar 2022 12:19:42 +0000 (14:19 +0200)
The first three fields of a note are binary, so they are subject to
flipping due to endianess. Instead of a stream of bytes, just use
the native 4-bytes type so that it gets encoded automatically.

Implemented in the tools via: https://github.com/systemd/package-notes/pull/31

docs/COREDUMP_PACKAGE_METADATA.md

index db75ad143258fc754939f22401e0de2c62b8becd..8dac5c61bf1812b227433e0c100083458d1b6efc 100644 (file)
@@ -92,9 +92,9 @@ $ ./generate-package-notes.py --rpm systemd-248~rc2-1.fc33.arm32 --cpe cpe:/o:fe
 SECTIONS
 {
     .note.package (READONLY) : ALIGN(4) {
-        BYTE(0x04) BYTE(0x00) BYTE(0x00) BYTE(0x00) /* Length of Owner including NUL */
-        BYTE(0x7b) BYTE(0x00) BYTE(0x00) BYTE(0x00) /* Length of Value including NUL */
-        BYTE(0x7e) BYTE(0x1a) BYTE(0xfe) BYTE(0xca) /* Note ID */
+        LONG(0x0004)                                /* Length of Owner including NUL */
+        LONG(0x007b)                                /* Length of Value including NUL */
+        LONG(0xcafe1a7e)                            /* Note ID */
         BYTE(0x46) BYTE(0x44) BYTE(0x4f) BYTE(0x00) /* Owner: 'FDO\x00' */
         BYTE(0x7b) BYTE(0x22) BYTE(0x74) BYTE(0x79) /* Value: '{"type":"rpm","name":"systemd","version":"248~rc2-1.fc33","architecture":"arm32","osCpe":"cpe:/o:fedoraproject:fedora:33"}\x00\x00' */
         BYTE(0x70) BYTE(0x65) BYTE(0x22) BYTE(0x3a)