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

fuchsia.hardware.block.partition

PROTOCOLS

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

NameType

Response

NameType
status zx/status

GetFifo

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

Request

NameType

Response

NameType
status zx/status
fifo handle<fifo>?

GetInfo

Get information about the underlying block device.

Request

NameType

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

NameType

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

NameType

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

NameType

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

NameType

Response

NameType
status zx/status

STRUCTS

GUID

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

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

NameTypeDescriptionDefault
value uint8[16] No default

CONSTANTS

NameValueTypeDescription
GUID_LENGTH 16 uint32
NAME_LENGTH 128 uint32