mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-20 23:16:28 -05:00
Introduce a new messaging system
This commit is contained in:
parent
fa5f31ddf9
commit
e56de653da
33 changed files with 1642 additions and 1518 deletions
|
|
@ -38,14 +38,14 @@ void state_rehash(struct snapraid_state* state)
|
|||
/* check if a rehash is already in progress */
|
||||
if (state->prevhash != HASH_UNDEFINED) {
|
||||
/* LCOV_EXCL_START */
|
||||
ferr("You already have a rehash in progress.\n");
|
||||
msg_error("You already have a rehash in progress.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
if (state->hash == state->besthash) {
|
||||
/* LCOV_EXCL_START */
|
||||
ferr("You are already using the best hash for your platform.\n");
|
||||
msg_error("You are already using the best hash for your platform.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
|
@ -58,7 +58,7 @@ void state_rehash(struct snapraid_state* state)
|
|||
state->hash = state->besthash;
|
||||
if (randomize(state->hashseed, HASH_SIZE) != 0) {
|
||||
/* LCOV_EXCL_START */
|
||||
ferr("Failed to get random values.\n");
|
||||
msg_error("Failed to get random values.\n");
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
|
@ -76,7 +76,7 @@ void state_rehash(struct snapraid_state* state)
|
|||
|
||||
if (info_get_rehash(info)) {
|
||||
/* LCOV_EXCL_START */
|
||||
ferr("Internal inconsistency for a rehash already in progress\n");
|
||||
msg_error("Internal inconsistency for a rehash already in progress\n");
|
||||
exit(EXIT_FAILURE);
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
|
@ -91,8 +91,8 @@ void state_rehash(struct snapraid_state* state)
|
|||
/* save the new content file */
|
||||
state->need_write = 1;
|
||||
|
||||
fout("A rehash is now scheduled. It will take place progressively in the next\n");
|
||||
fout("'sync' and 'scrub' commands. You can check the rehash progress using the\n");
|
||||
fout("'status' command.\n");
|
||||
msg_status("A rehash is now scheduled. It will take place progressively in the next\n");
|
||||
msg_status("'sync' and 'scrub' commands. You can check the rehash progress using the\n");
|
||||
msg_status("'status' command.\n");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue