struct VPartitionEntry

Defined at line 343 of file ../../src/storage/fvm/format.h

Represent an entry in the FVM Partition table, which is fixed size contiguous flat buffer.

Public Members

uint8_t[16] type
uint8_t[16] guid
uint32_t slices
uint32_t flags
uint8_t[24] unsafe_name

Public Methods

void VPartitionEntry (const uint8_t[16] type, const uint8_t[16] guid, uint32_t slices, std::string name, uint32_t flags)

The name must not contain embedded nulls (this code will assert if it does). The name will

be truncated to kMaxVPartitionNameLength characters.

See StringFromArray() to create the name parmeter if you're creating from another fixed-length

buffer.

The format of the flags is not user-controllable since the flag values are not exposed in the

header. Pass either 0 for default, or copy from another VPartitionEntry.

Defined at line 255 of file ../../src/storage/fvm/format.cc

VPartitionEntry CreateReservedPartition ()

Creates an entry which is used to retain slices for future use.

Defined at line 266 of file ../../src/storage/fvm/format.cc

uint32_t MaskInvalidFlags (uint32_t raw_flags)

Returns the allowed set of flags in |raw_flags|.

Defined at line 273 of file ../../src/storage/fvm/format.cc

bool IsAllocated ()

Returns true if the entry is allocated.

Defined at line 281 of file ../../src/storage/fvm/format.cc

bool IsFree ()

Returns true if the entry is free.

Defined at line 283 of file ../../src/storage/fvm/format.cc

void Release ()

Releases the partition, marking it as free.

Defined at line 289 of file ../../src/storage/fvm/format.cc

bool IsActive ()

Returns true if the partition is should be treated as active..

Defined at line 277 of file ../../src/storage/fvm/format.cc

bool IsInactive ()

Returns true if the partition is flagged as inactive.

Defined at line 279 of file ../../src/storage/fvm/format.cc

bool IsInternalReservationPartition ()

Returns true if the partition is an internal one used for reserving slices for future uses.

Defined at line 285 of file ../../src/storage/fvm/format.cc

void SetActive (bool is_active)

Marks this entry active status as |is_active|.

Defined at line 294 of file ../../src/storage/fvm/format.cc

void VPartitionEntry ()

Defined at line 344 of file ../../src/storage/fvm/format.h

template <size_t N>
std::string StringFromArray (const uint8_t (&)[N] array)

Creates a string from the given possibly-null-terminated fixed-length buffer. If there is a

null terminator it will indicate the end of the string. if there is none, the string will use

up the entire input buffer.

Defined at line 364 of file ../../src/storage/fvm/format.h

std::string name ()

Defined at line 394 of file ../../src/storage/fvm/format.h

void set_name (std::string_view name)

Defined at line 395 of file ../../src/storage/fvm/format.h