diff options
author | Adam Spragg <adam@spra.gg> | 2022-05-16 09:44:30 +0100 |
---|---|---|
committer | Adam Spragg <adam@spra.gg> | 2022-05-18 17:19:15 +0100 |
commit | 527214c7ee648cccbe4abbb11bde298b7b52141b (patch) | |
tree | 970be2b4d7693bf231d5be170326f49b2776c476 | |
parent | fe09dabc0d7684075bd06b50132250ce7dfa1bb0 (diff) |
Label file Format 0 explicitly as Format 0
-rw-r--r-- | FILEFORMAT_0 (renamed from FILEFORMAT) | 0 | ||||
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | README | 2 | ||||
-rw-r--r-- | src/metaentry.c | 4 | ||||
-rw-r--r-- | src/metastore.h | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/FILEFORMAT b/FILEFORMAT_0 index 0fddf85..0fddf85 100644 --- a/FILEFORMAT +++ b/FILEFORMAT_0 @@ -26,7 +26,7 @@ UNAME_S := $(shell uname -s) DOCS := \ AUTHORS \ - FILEFORMAT \ + FILEFORMAT_0 \ LICENSE.GPLv2 \ NEWS \ README \ @@ -44,7 +44,7 @@ Dump action can be really helpful in such cases. File format ----------- -See FILEFORMAT file, which describes internals of metastore file. +See FILEFORMAT_0 file, which describes internals of metastore file. Requirements diff --git a/src/metaentry.c b/src/metaentry.c index fe1c6d1..a26c764 100644 --- a/src/metaentry.c +++ b/src/metaentry.c @@ -422,7 +422,7 @@ mentries_tofile(const struct metahash *mhash, const char *path) } write_binary_string(SIGNATURE, SIGNATURELEN, to); - write_binary_string(VERSION, VERSIONLEN, to); + write_binary_string(VERSION_0, VERSIONLEN, to); for (key = 0; key < HASH_INDEXES; key++) { for (mentry = mhash->bucket[key]; mentry; mentry = mentry->next) { @@ -494,7 +494,7 @@ mentries_fromfile(struct metahash **mhash, const char *path) } ptr += SIGNATURELEN; - if (strncmp(ptr, VERSION, VERSIONLEN)) { + if (strncmp(ptr, VERSION_0, VERSIONLEN)) { msg(MSG_CRITICAL, "Invalid version of file %s\n", path); goto out; } diff --git a/src/metastore.h b/src/metastore.h index bedad6c..612b55b 100644 --- a/src/metastore.h +++ b/src/metastore.h @@ -24,7 +24,7 @@ /* Each file starts with SIGNATURE and VERSION */ #define SIGNATURE "MeTaSt00r3" #define SIGNATURELEN 10 -#define VERSION "\0\0\0\0\0\0\0\0" +#define VERSION_0 "\0\0\0\0\0\0\0\0" #define VERSIONLEN 8 /* Default filename */ |