summaryrefslogtreecommitdiffstats
path: root/src/detection/btrfs/btrfs.h
blob: 08ea4e9bc19349b34160c5cc6f8848bfbac4fc7d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#pragma once

#include "fastfetch.h"
#include "modules/btrfs/option.h"

typedef struct FFBtrfsDiskUsage {
    uint64_t total;
    uint64_t used;
    const char* type;
    const char* profile; // single / dup / raidx
    uint8_t copies;
} FFBtrfsDiskUsage;

typedef struct FFBtrfsResult {
    FFstrbuf name;
    FFstrbuf uuid;
    FFstrbuf devices;
    FFstrbuf features;
    uint32_t generation;
    uint32_t nodeSize;
    uint32_t sectorSize;
    uint64_t totalSize;
    uint64_t globalReservationUsed;
    uint64_t globalReservationTotal;
    FFBtrfsDiskUsage allocation[3];
} FFBtrfsResult;

const char* ffDetectBtrfs(FFlist* result /* list of FFBtrfsResult */);