Give time reference for attributes read from disk

This commit is contained in:
Andrea Mazzoleni 2026-02-08 17:47:58 +01:00
parent 345f9bf019
commit 4a25cdc952
2 changed files with 9 additions and 0 deletions

View file

@ -950,6 +950,7 @@ void state_device(struct snapraid_state* state, int operation, tommy_list* filte
tommy_list high;
tommy_list low;
int ret;
time_t now = time(0);
switch (operation) {
case DEVICE_UP : msg_progress("Spinup...\n"); break;
@ -1007,6 +1008,10 @@ void state_device(struct snapraid_state* state, int operation, tommy_list* filte
}
}
/* with a GUI always gives time reference */
if (state->opt.gui)
log_tag("unixtime:%" PRIi64 "\n", (int64_t)now);
if (state->opt.fake_device) {
ret = devtest(&high, &low, operation);
} else {

View file

@ -186,6 +186,10 @@ void state_thermal(struct snapraid_state* state, time_t now)
}
}
/* with a GUI always gives time reference */
if (state->opt.gui)
log_tag("unixtime:%" PRIi64 "\n", (int64_t)now);
if (state->opt.fake_device) {
ret = devtest(&high, &low, DEVICE_SMART);
} else {