/
githubmirror
/
nvme-cli
Обзор
Документация
Войти
/
githubmirror
/
nvme-cli
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
shared/temp-util.h
22 строки
436 B
Daniel Wagner
shared: move temperature/timestamp/spinner helpers out of util/types.c
07 авг 2026, 16:15
07 авг 2026, 16:15
5d56a60
Код
Авторство
О чём код?
/* SPDX-License-Identifier: LGPL-2.1-or-later */ /* * This file is part of nvme-cli. */ #pragma once #define SHR_ABSOLUTE_ZERO_CELSIUS -273 static inline long shr_kelvin_to_celsius(long t) { return t + SHR_ABSOLUTE_ZERO_CELSIUS; } static inline long shr_celsius_to_fahrenheit(long t) { return t * 9 / 5 + 32; } static inline long shr_kelvin_to_fahrenheit(long t) { return shr_celsius_to_fahrenheit(shr_kelvin_to_celsius(t)); }