Files
fastfetch/src/detection/physicaldisk/physicaldisk.h
T

33 lines
784 B
C
Raw Normal View History

2023-12-18 10:43:20 +08:00
#include "fastfetch.h"
2023-12-26 19:23:26 +08:00
#define FF_PHYSICALDISK_TEMP_UNSET (0/0.0)
2023-12-18 10:43:20 +08:00
typedef enum FFPhysicalDiskType
{
FF_PHYSICALDISK_TYPE_NONE = 0,
// If neither is set, it's unknown
FF_PHYSICALDISK_TYPE_HDD = 1 << 0,
FF_PHYSICALDISK_TYPE_SSD = 1 << 1,
FF_PHYSICALDISK_TYPE_FIXED = 1 << 2,
FF_PHYSICALDISK_TYPE_REMOVABLE = 1 << 3,
2023-12-24 22:34:45 +08:00
2023-12-25 08:55:17 +08:00
FF_PHYSICALDISK_TYPE_READWRITE = 1 << 4,
FF_PHYSICALDISK_TYPE_READONLY = 1 << 5,
2023-12-18 10:43:20 +08:00
} FFPhysicalDiskType;
typedef struct FFPhysicalDiskResult
{
FFstrbuf name;
FFstrbuf interconnect;
FFstrbuf serial;
FFstrbuf devPath;
FFstrbuf revision;
2023-12-18 10:43:20 +08:00
FFPhysicalDiskType type;
uint64_t size;
2023-12-26 19:23:26 +08:00
double temperature;
2023-12-18 10:43:20 +08:00
} FFPhysicalDiskResult;
const char* ffDetectPhysicalDisk(FFlist* result, FFPhysicalDiskOptions* options);