Make state_thermal() return 0 on success and -1 on failure

This commit is contained in:
Andrea Mazzoleni 2026-09-06 23:03:31 +02:00
parent a0c7d69067
commit 2fd94baa05
2 changed files with 21 additions and 7 deletions

View file

@ -402,9 +402,11 @@ void state_usage_print(struct snapraid_state* state);
void state_fscheck(struct snapraid_state* state, const char* ope);
/**
* Measure the temperature of all disks
* Measure the temperature of all disks.
* Return 0 if thermal information was successfully gathered, -1 if thermal gathering failed, is not supported, or no valid temperature is available.
* Individual disks without a valid temperature are ignored as long as at least one disk provides a valid temperature.
*/
void state_thermal(struct snapraid_state* state, time_t now);
int state_thermal(struct snapraid_state* state, time_t now);
/**
* Check if the temperature is outside the operating range