Added max, min drive temperatures to log

Added the max and min drive temperatures to the nwipe
log. We now have upto six temperatures that may be reported
for each drive. Whether all these fields are populated is
down to each drive manufacturer.
This commit is contained in:
PartialVolume
2023-03-14 23:53:21 +00:00
parent 08cba2ee5e
commit 79cedf47fc
2 changed files with 24 additions and 2 deletions

View File

@@ -300,6 +300,17 @@ void nwipe_log_drives_temperature_limits( nwipe_context_t* c )
idx = strlen( temperature_limits_txt );
if( c->temp1_max != 1000000 )
{
snprintf( &temperature_limits_txt[idx], ( sizeof( temperature_limits_txt ) - idx ), "max=%ic, ", c->temp1_max );
}
else
{
snprintf( &temperature_limits_txt[idx], ( sizeof( temperature_limits_txt ) - idx ), "max=N/A, " );
}
idx = strlen( temperature_limits_txt );
if( c->temp1_highest != 1000000 )
{
snprintf( &temperature_limits_txt[idx],
@@ -326,6 +337,17 @@ void nwipe_log_drives_temperature_limits( nwipe_context_t* c )
idx = strlen( temperature_limits_txt );
if( c->temp1_min != 1000000 )
{
snprintf( &temperature_limits_txt[idx], ( sizeof( temperature_limits_txt ) - idx ), "min=%ic, ", c->temp1_min );
}
else
{
snprintf( &temperature_limits_txt[idx], ( sizeof( temperature_limits_txt ) - idx ), "min=N/A, " );
}
idx = strlen( temperature_limits_txt );
if( c->temp1_lcrit != 1000000 )
{
snprintf( &temperature_limits_txt[idx],

View File

@@ -4,7 +4,7 @@
* used by configure to dynamically assign those values
* to documentation files.
*/
const char* version_string = "0.34.6 Development code, not for production use!";
const char* version_string = "0.34.7 Development code, not for production use!";
const char* program_name = "nwipe";
const char* author_name = "Martijn van Brummelen";
const char* email_address = "git@brumit.nl";
@@ -14,4 +14,4 @@ Modifications to original dwipe Copyright Andy Beverley <andy@andybev.com>\n\
This is free software; see the source for copying conditions.\n\
There is NO warranty; not even for MERCHANTABILITY or FITNESS\n\
FOR A PARTICULAR PURPOSE.\n";
const char* banner = "nwipe 0.34.6 Development code, not for production use!";
const char* banner = "nwipe 0.34.7 Development code, not for production use!";