mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 10:51:54 -04:00
Don't print the "Nothing to do" if the state was updated
This commit is contained in:
parent
c1e101699a
commit
467fb8c1ac
2 changed files with 8 additions and 1 deletions
|
|
@ -141,6 +141,7 @@ void state_init(struct snapraid_state* state)
|
|||
state->filter_hidden = 0;
|
||||
state->autosave = 0;
|
||||
state->need_write = 0;
|
||||
state->written = 0;
|
||||
state->checked_read = 0;
|
||||
state->block_size = 256 * KIBI; /* default 256 KiB */
|
||||
state->raid_mode = RAID_MODE_CAUCHY;
|
||||
|
|
@ -4213,6 +4214,7 @@ void state_write(struct snapraid_state* state)
|
|||
|
||||
state->need_write = 0; /* no write needed anymore */
|
||||
state->checked_read = 0; /* what we wrote is not checked in read */
|
||||
state->written = 1;
|
||||
}
|
||||
|
||||
void state_skip(struct snapraid_state* state)
|
||||
|
|
@ -4380,7 +4382,11 @@ void state_progress_end(struct snapraid_state* state, block_off_t countpos, bloc
|
|||
log_tag("run:end\n");
|
||||
log_flush();
|
||||
} else if (countmax == 0) {
|
||||
msg_status("Nothing to do\n");
|
||||
if (state->need_write || state->written) {
|
||||
msg_status("100%% completed\n");
|
||||
} else {
|
||||
msg_status("Nothing to do\n");
|
||||
}
|
||||
} else {
|
||||
time_t now;
|
||||
time_t elapsed;
|
||||
|
|
|
|||
|
|
@ -123,6 +123,7 @@ struct snapraid_state {
|
|||
int filter_hidden; /**< Filter out hidden files. */
|
||||
uint64_t autosave; /**< Autosave after the specified amount of data. 0 to disable. */
|
||||
int need_write; /**< If the state is changed. */
|
||||
int written; /**< If the state was written at least one time */
|
||||
int checked_read; /**< If the state was read and checked. */
|
||||
uint32_t block_size; /**< Block size in bytes. */
|
||||
unsigned raid_mode; /**< Raid mode to use. RAID_MODE_DEFAULT or RAID_MODE_ALTERNATE. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue