acpi_thermal: fix previous commit

sorry for the noise

Change-Id: Ic696f48b87d017492e054641c2b9c61a910fed0b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4871
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
This commit is contained in:
Jérôme Duval 2022-01-18 09:56:05 +01:00
parent 0fc10268e0
commit a4c7f6c623

View File

@ -64,18 +64,18 @@ acpi_thermal_read(void* _cookie, off_t position, void* buf, size_t* num_bytes)
char* str = (char*)buf;
acpi_thermal_control(device, drvOpGetThermalType, &therm_info, 0);
snprintf(str, max_len, " Critical Temperature: %"B_PRIu32" %"B_PRIu32" K\n",
snprintf(str, max_len, " Critical Temperature: %" B_PRIu32 ".%" B_PRIu32 " K\n",
(therm_info.critical_temp / 10), (therm_info.critical_temp % 10));
max_len -= strlen(str);
str += strlen(str);
snprintf(str, max_len, " Current Temperature: %"B_PRIu32" %"B_PRIu32" K\n",
snprintf(str, max_len, " Current Temperature: %" B_PRIu32 ".%" B_PRIu32 " K\n",
(therm_info.current_temp / 10), (therm_info.current_temp % 10));
if (therm_info.hot_temp > 0) {
max_len -= strlen(str);
str += strlen(str);
snprintf(str, max_len, " Hot Temperature: %"B_PRIu32" %"B_PRIu32" K\n",
snprintf(str, max_len, " Hot Temperature: %" B_PRIu32 ".%" B_PRIu32 " K\n",
(therm_info.hot_temp / 10), (therm_info.hot_temp % 10));
}