From 4a25cdc952ab3b8d0d36156d95f2f4c5555a243b Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Sun, 8 Feb 2026 17:47:58 +0100 Subject: [PATCH] Give time reference for attributes read from disk --- cmdline/device.c | 5 +++++ cmdline/thermal.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/cmdline/device.c b/cmdline/device.c index 110c1c29..b1aa8438 100644 --- a/cmdline/device.c +++ b/cmdline/device.c @@ -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 { diff --git a/cmdline/thermal.c b/cmdline/thermal.c index f2c91a94..59b07e2a 100644 --- a/cmdline/thermal.c +++ b/cmdline/thermal.c @@ -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 {