mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 10:51:54 -04:00
Some more semplifications in error reporting.
This commit is contained in:
parent
451f87bae4
commit
3c8b659c8a
1 changed files with 6 additions and 6 deletions
|
|
@ -596,13 +596,13 @@ static int state_sync_process(struct snapraid_state* state, struct snapraid_pari
|
|||
/* file we are processing for error reporting */
|
||||
struct snapraid_file* file = block_file_get(block);
|
||||
fprintf(stdlog, "error:%u:%s:%s: Unexpected attribute change\n", i, disk->name, file->sub);
|
||||
if (handle[j].st.st_size != block_file_get(block)->size) {
|
||||
fprintf(stderr, "Unexpected size change at file '%s' from %"PRIu64" to %"PRIu64".\n", handle[j].path, block_file_get(block)->size, handle[j].st.st_size);
|
||||
} else if (handle[j].st.st_mtime != block_file_get(block)->mtime_sec
|
||||
|| STAT_NSEC(&handle[j].st) != block_file_get(block)->mtime_nsec) {
|
||||
fprintf(stderr, "Unexpected time change at file '%s' from %"PRIu64".%d to %"PRIu64".%d.\n", handle[j].path, block_file_get(block)->mtime_sec, block_file_get(block)->mtime_nsec, (uint64_t)handle[j].st.st_mtime, (uint32_t)STAT_NSEC(&handle[j].st));
|
||||
if (handle[j].st.st_size != file->size) {
|
||||
fprintf(stderr, "Unexpected size change at file '%s' from %"PRIu64" to %"PRIu64".\n", handle[j].path, file->size, handle[j].st.st_size);
|
||||
} else if (handle[j].st.st_mtime != file->mtime_sec
|
||||
|| STAT_NSEC(&handle[j].st) != file->mtime_nsec) {
|
||||
fprintf(stderr, "Unexpected time change at file '%s' from %"PRIu64".%d to %"PRIu64".%d.\n", handle[j].path, file->mtime_sec, file->mtime_nsec, (uint64_t)handle[j].st.st_mtime, (uint32_t)STAT_NSEC(&handle[j].st));
|
||||
} else {
|
||||
fprintf(stderr, "Unexpected inode change from %"PRIu64" to %"PRIu64" at file '%s'.\n", block_file_get(block)->inode, (uint64_t)handle[j].st.st_ino, handle[j].path);
|
||||
fprintf(stderr, "Unexpected inode change from %"PRIu64" to %"PRIu64" at file '%s'.\n", file->inode, (uint64_t)handle[j].st.st_ino, handle[j].path);
|
||||
}
|
||||
fprintf(stderr, "WARNING! You cannot modify files during a sync.\n");
|
||||
fprintf(stderr, "Rerun the sync command when finished.\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue