journal: use FSS_HEADER_SIGNATURE at one more place

This commit is contained in:
Yu Watanabe
2026-06-27 20:36:36 +09:00
parent 1828327e75
commit a97de75de7
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -139,7 +139,7 @@ int action_setup_keys(void) {
r, "Failed to set file attributes on a temporary file for '%s', ignoring: %m", path);
struct FSSHeader h = {
.signature = { 'K', 'S', 'H', 'H', 'R', 'H', 'L', 'P' },
.signature = FSS_HEADER_SIGNATURE,
.machine_id = machine,
.boot_id = boot,
.header_size = htole64(sizeof(h)),
@@ -392,7 +392,7 @@ int journal_file_fss_load(JournalFile *f) {
if (header == MAP_FAILED)
return -errno;
if (memcmp(header->signature, FSS_HEADER_SIGNATURE, 8) != 0)
if (memcmp(header->signature, (const uint8_t[]) FSS_HEADER_SIGNATURE, 8) != 0)
return -EBADMSG;
if (header->incompatible_flags != 0)
+1 -1
View File
@@ -261,7 +261,7 @@ assert_cc(sizeof(struct Header) == sizeof(struct Header__packed));
assert_cc(sizeof(struct Header) == 272);
#define FSS_HEADER_SIGNATURE \
((const char[]) { 'K', 'S', 'H', 'H', 'R', 'H', 'L', 'P' })
{ 'K', 'S', 'H', 'H', 'R', 'H', 'L', 'P' }
struct FSSHeader {
uint8_t signature[8]; /* "KSHHRHLP" */