master ohmu/fastfetch-openbsd / src / modules / physicaldisk / option.h
ohmu  ·  2026-10-15
 1#pragma once
 2
 3#include "common/option.h"
 4
 5typedef enum FFPhysicalDiskType: uint8_t {
 6    FF_PHYSICALDISK_TYPE_NONE = 0,
 7
 8    // If none is set, it's unknown
 9    FF_PHYSICALDISK_TYPE_HDD = 1 << 0,
10    FF_PHYSICALDISK_TYPE_SSD = 1 << 1,
11    FF_PHYSICALDISK_TYPE_VIRTUAL = 1 << 2,
12
13    FF_PHYSICALDISK_TYPE_FIXED = 1 << 3,
14    FF_PHYSICALDISK_TYPE_REMOVABLE = 1 << 4,
15
16    FF_PHYSICALDISK_TYPE_READWRITE = 1 << 5,
17    FF_PHYSICALDISK_TYPE_READONLY = 1 << 6,
18
19    FF_PHYSICALDISK_TYPE_UNUSED = 1 << 7,
20} FFPhysicalDiskType;
21static_assert(sizeof(FFPhysicalDiskType) == sizeof(uint8_t), "");
22
23typedef struct FFPhysicalDiskOptions {
24    FFModuleArgs moduleArgs;
25
26    FFstrbuf namePrefix;
27    FFPhysicalDiskType hideType;
28    bool temp;
29    FFColorRangeConfig tempConfig;
30} FFPhysicalDiskOptions;
31
32static_assert(sizeof(FFPhysicalDiskOptions) <= FF_OPTION_MAX_SIZE, "FFPhysicalDiskOptions size exceeds maximum allowed size");