Update invalid environment variable handling to actually fail rather than auto-correct.
This commit is contained in:
parent
e9ce7a5ed2
commit
ab1ced942d
1 changed files with 4 additions and 2 deletions
|
@ -227,8 +227,10 @@ create_dedupe_context(uint64_t chunksize, uint64_t real_chunksize, int rab_blk_s
|
|||
if ((ck = getenv("PCOMPRESS_CHUNK_HASH_GLOBAL")) != NULL) {
|
||||
if (get_checksum_props(ck, &chunk_cksum, &cksum_bytes, &mac_bytes, 1) != 0 ||
|
||||
strcmp(ck, "CRC64") == 0) {
|
||||
fprintf(stderr, "Invalid PCOMPRESS_CHUNK_HASH_GLOBAL. Reverting to default.\n");
|
||||
chunk_cksum = 0;
|
||||
fprintf(stderr, "Invalid PCOMPRESS_CHUNK_HASH_GLOBAL.\n");
|
||||
chunk_cksum = -1;
|
||||
pthread_mutex_unlock(&init_lock);
|
||||
return (NULL);
|
||||
}
|
||||
}
|
||||
if (chunk_cksum == 0) {
|
||||
|
|
Loading…
Reference in a new issue