std1.0.0-beta-7 SafeC docs

std :: fs::partition

Struct std::PartTable

#include <std/fs/partition.h> source

struct PartTable {
    struct PartEntry entries[PART_MAX];
    int count;
}

Fields

§struct PartEntry entries[PART_MAX]source
§int countsource

number of valid (non-empty) entries

Methods

§const ?&PartEntry get(int idx) constsource · definition

Access entry by index (0-3). Returns a reference into entries[], or empty (null) if idx is out of range — check entry.type != PART_TYPE_EMPTY too, for a valid index that just has no partition recorded there.

Read and parse the MBR from sector 0 of dev into this table. Returns 0 on success, -1 on read error or bad signature.