mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-03 05:10:16 -05:00
Prints more informative comments if the hash type is not defined or MD5.
This commit is contained in:
parent
452f88795f
commit
91752b255b
3 changed files with 21 additions and 6 deletions
15
state.c
15
state.c
|
|
@ -745,9 +745,9 @@ void state_read(struct snapraid_state* state)
|
|||
return;
|
||||
}
|
||||
|
||||
/* start with a MD5 default. */
|
||||
/* start with a undefined default. */
|
||||
/* it's for compatibility with version 1.0 where MD5 was implicit. */
|
||||
state->hash = HASH_MD5;
|
||||
state->hash = HASH_UNDEFINED;
|
||||
|
||||
disk = 0;
|
||||
file = 0;
|
||||
|
|
@ -1384,8 +1384,17 @@ void state_read(struct snapraid_state* state)
|
|||
|
||||
sclose(f);
|
||||
|
||||
if (state->hash == HASH_UNDEFINED) {
|
||||
fprintf(stderr, "The checksum to use is not specified.\n");
|
||||
fprintf(stderr, "This happens because you are likely upgrading from SnapRAID 1.0.\n");
|
||||
fprintf(stderr, "To use the SnapRAID 2.x branch, you must restart from scratch,\n");
|
||||
fprintf(stderr, "deleting all the content and parity files.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
if (state->hash == HASH_MD5) {
|
||||
fprintf(stderr, "MD5 is not supported anymore.\n");
|
||||
fprintf(stderr, "The MD5 checksum is not supported anymore.\n");
|
||||
fprintf(stderr, "To use the SnapRAID 2.x branch, you must restart from scratch,\n");
|
||||
fprintf(stderr, "deleting all the content and parity files.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue