Google is committed to advancing racial equity for Black communities. See how.

fuchsia.hardware.block.partition

PROTOCOLS

BlockPartition

Defined in fuchsia.hardware.block.partition/partition.fidl

GetGuid

Get a GUID of the partition (if one exists).

Request

NameType
guid_type GUIDType

Response

NameType
status zx/status
guid GUID

GetName

Get the name of the partition (if one exists).

Request

<EMPTY>

Response

NameType
status zx/status
name string[128]?

Partition

Defined in fuchsia.hardware.block.partition/partition.fidl

Partition describes a region of one or more block devices, labelled with distinguishing identifiers.

AttachVmo

Attaches a VMO to the currently running FIFO server.

Request

NameType
vmo handle<vmo>

Response

NameType
status zx/status
vmoid fuchsia.hardware.block/VmoId?

CloseFifo

Shuts down the fifo server, waiting for it to be ready to be started again.

When this method returns, a client may safely invoke GetFifo to acquire a new connection to the block server, without being told that a server is already serving requests on a different fifo.

If, instead of invoking "CloseFifo", a client merely closes their fifo, the server automatically cleans up all resources anyway. In this case, however, the client will have no guarantee that the next invocation of "GetFifo" will return a connection successfully.

Request

<EMPTY>

Response

NameType
status zx/status

GetFifo

Sets up a FIFO-based server on the block device; acquire the handle to it.

Request

<EMPTY>

Response

NameType
status zx/status
fifo handle<fifo>?

GetInfo

Get information about the underlying block device.

Request

<EMPTY>

Response

NameType
status zx/status
info fuchsia.hardware.block/BlockInfo?

GetInstanceGuid

Gets the instance GUID of the partition (if one exists). If the partition has no instance GUID, ZX_ERR_NOT_SUPPORTED is returned.

Request

<EMPTY>

Response

NameType
status zx/status
guid GUID?

GetName

Gets the name of the partition (if one exists). If the partition has no name, ZX_ERR_NOT_SUPPORTED is returned.

Request

<EMPTY>

Response

NameType
status zx/status
name string[128]?

GetStats

Returns stats about the block device on the provided buffer and optionally clears the counters.

Request

NameType
clear bool

Response

NameType
status zx/status
stats fuchsia.hardware.block/BlockStats?

GetTypeGuid

Gets the type GUID of the partition (if one exists). If the partition has no type GUID, ZX_ERR_NOT_SUPPORTED is returned.

Request

<EMPTY>

Response

NameType
status zx/status
guid GUID?

RebindDevice

Rebinds the block device (if supported).

WARNING: This is only added for parity with block device ioctls; this is going to move into the device FIDL API.

Request

<EMPTY>

Response

NameType
status zx/status

STRUCTS

GUID

Defined in fuchsia.hardware.block.partition/partition.fidl

A Globally Unique Identifier (GUID) used to distinguish partitions.

FieldTypeDescriptionDefault
data1 uint32 No default
data2 uint16 No default
data3 uint16 No default
data4 uint8[8] No default

GUID

Defined in fuchsia.hardware.block.partition/partition.fidl

A Globally Unique IDentifier, which may be utilized to identify a partition.

FieldTypeDescriptionDefault
value uint8[16] No default

ENUMS

GUIDType strict

Type: uint8

Defined in fuchsia.hardware.block.partition/partition.fidl

NameValueDescription
TYPE 0
INSTANCE 1

CONSTANTS

NameValueTypeDescription
GUID_LENGTH 16 uint32

The length of a GUID, in bytes.

GUID_LENGTH 16 uint32
MAX_PARTITION_NAME_LENGTH 128 uint32

The maximum length of a partition entry name, in bytes.

NAME_LENGTH 128 uint32