Add CRC-32 fingerprinting of symlink targets

Hash the followed target content with CRC-32 (hash.c/hash.h) and emit a FINGERPRINT field for non-directory records in create.c. Schema: TYPE|MODE|UID|GID|MTIME|SIZE|FINGERPRINT|TARGET per SPEC §17/§18.
This commit is contained in:
Fabio Scotto di Santolo
2026-08-23 17:47:09 +02:00
parent 9df9223b63
commit e5f5d559bc
6 changed files with 137 additions and 7 deletions

9
include/hash.h Normal file
View File

@@ -0,0 +1,9 @@
#ifndef HASH_H
#define HASH_H
#include <stdint.h>
#include <stdio.h>
uint32_t crc32(FILE *stream);
#endif

View File

@@ -8,6 +8,8 @@ enum Fields {
GID,
SIZE,
TIME,
TARGET,
FINGERPRINT,
PATH,
NONE,
};