Change some warnings to errors to always print them on screen

This commit is contained in:
Andrea Mazzoleni 2015-04-19 21:13:05 +02:00
parent 2e248b42ae
commit a5a72f4a31
4 changed files with 17 additions and 17 deletions

View file

@ -138,10 +138,10 @@ void parity_overflow(struct snapraid_state* state, data_off_t size)
msg_tag("outofparity:%s:%s\n", disk->name, esc(file->sub));
if (first) {
first = 0;
msg_warning("\nYour data requires more parity than the available space.\n");
msg_warning("Please move the files 'outofparity' to another data disk:\n");
msg_error("\nYour data requires more parity than the available space.\n");
msg_error("Please move the files 'outofparity' to another data disk:\n");
}
msg_warning("outofparity %s%s\n", disk->dir, file->sub);
msg_error("outofparity %s%s\n", disk->dir, file->sub);
msg_flush();
}
}

View file

@ -181,7 +181,7 @@ static void make_link(const char* pool_dir, const char* share_dir, struct snapra
ret = symlink(linkto_exported, path);
if (ret != 0) {
if (errno == EEXIST) {
msg_warning("WARNING! Duplicate pooling for '%s'\n", path);
msg_error("WARNING! Duplicate pooling for '%s'\n", path);
#ifdef _WIN32
} else if (errno == EPERM) {
/* LCOV_EXCL_START */

View file

@ -1529,7 +1529,7 @@ static int state_diffscan(struct snapraid_state* state, int is_diff)
/* if verbose, prints the list of duplicates real offsets */
/* other cases are for offsets not supported, so we don't need to report them file by file */
if (phy_last >= FILEPHY_REAL_OFFSET) {
msg_warning("WARNING! Files '%s%s' and '%s%s' have the same physical offset %" PRId64 ".\n", disk->dir, phy_file_last->sub, disk->dir, file->sub, phy_last);
msg_error("WARNING! Files '%s%s' and '%s%s' have the same physical offset %" PRId64 ".\n", disk->dir, phy_file_last->sub, disk->dir, file->sub, phy_last);
}
++phy_dup;
}

View file

@ -389,11 +389,11 @@ static void state_config_check(struct snapraid_state* state, const char* path, t
#endif
if (state->raid_mode == RAID_MODE_CAUCHY) {
if (state->level == 3) {
msg_warning("WARNING! Your CPU doesn't have a fast implementation for triple parity.\n");
msg_warning("WARNING! It's recommended to switch to 'z-parity' instead than '3-parity'.\n");
msg_error("WARNING! Your CPU doesn't have a fast implementation for triple parity.\n");
msg_error("WARNING! It's recommended to switch to 'z-parity' instead than '3-parity'.\n");
} else if (state->level > 3) {
msg_warning("WARNING! Your CPU doesn't have a fast implementation beyond triple parity.\n");
msg_warning("WARNING! It's recommended to reduce the parity levels to triple parity.\n");
msg_error("WARNING! Your CPU doesn't have a fast implementation beyond triple parity.\n");
msg_error("WARNING! It's recommended to reduce the parity levels to triple parity.\n");
}
}
@ -1273,15 +1273,15 @@ static void state_map(struct snapraid_state* state)
/* recommend number of parities */
if (diskcount >= 36 && state->level < 6) {
msg_warning("WARNING! With %u disks it's recommended to use six parity levels.\n", diskcount);
msg_error("WARNING! With %u disks it's recommended to use six parity levels.\n", diskcount);
} else if (diskcount >= 29 && state->level < 5) {
msg_warning("WARNING! With %u disks it's recommended to use five parity levels.\n", diskcount);
msg_error("WARNING! With %u disks it's recommended to use five parity levels.\n", diskcount);
} else if (diskcount >= 22 && state->level < 4) {
msg_warning("WARNING! With %u disks it's recommended to use four parity levels.\n", diskcount);
msg_error("WARNING! With %u disks it's recommended to use four parity levels.\n", diskcount);
} else if (diskcount >= 15 && state->level < 3) {
msg_warning("WARNING! With %u disks it's recommended to use three parity levels.\n", diskcount);
msg_error("WARNING! With %u disks it's recommended to use three parity levels.\n", diskcount);
} else if (diskcount >= 5 && state->level < 2) {
msg_warning("WARNING! With %u disks it's recommended to use two parity levels.\n", diskcount);
msg_error("WARNING! With %u disks it's recommended to use two parity levels.\n", diskcount);
}
}
@ -4421,7 +4421,7 @@ void state_read(struct snapraid_state* state)
/* otherwise continue */
if (node->next) {
msg_warning("WARNING! Content file '%s' not found, trying with another copy...\n", path);
msg_error("WARNING! Content file '%s' not found, trying with another copy...\n", path);
/* ensure to rewrite all the content files */
state->need_write = 1;
@ -4472,8 +4472,8 @@ void state_read(struct snapraid_state* state)
} else {
/* if the size is different */
if (other_st.st_size != st.st_size) {
msg_warning("WARNING! Content files '%s' and '%s' have a different size!\n", path, other_path);
msg_warning("Likely one of the two is broken!\n");
msg_error("WARNING! Content files '%s' and '%s' have a different size!\n", path, other_path);
msg_error("Likely one of the two is broken!\n");
/* ensure to rewrite all the content files */
state->need_write = 1;