class GptDevicePartitioner
Defined at line 37 of file ../../src/firmware/paver/gpt.h
Useful for when a GPT table is available (e.g. x86 devices). Provides common
utility functions.
Public Methods
const paver::BlockDevices & devices ()
Defined at line 105 of file ../../src/firmware/paver/gpt.h
fidl::UnownedClientEnd<fuchsia_io::Directory> svc_root ()
Defined at line 107 of file ../../src/firmware/paver/gpt.h
zx::result<InitializeGptResult> InitializeGpt (const paver::BlockDevices & devices, fidl::UnownedClientEnd<fuchsia_io::Directory> svc_root, const PaverConfig & config, fidl::ClientEnd<fuchsia_device::Controller> block_controller)
Find and initialize a GPT based device.
If block_controller is provided, then that device is used directly. Otherwise, query fshost
for the system GPT, and use that.
If the system GPT was not formatted correctly, attempts to format it by calling
fuchsia.fshost/Recovery.InitSystemPartitionTable. This won't be done on directly provided
`block_controller` instances.
Defined at line 306 of file ../../src/firmware/paver/gpt.cc
zx::result<std::unique_ptr<GptDevice>> ConnectToGpt ()
Defined at line 456 of file ../../src/firmware/paver/gpt.cc
zx::result<std::unique_ptr<BlockPartitionClient>> FindPartition (FilterCallback filter)
Returns a connection to the first matching partition.
Defined at line 465 of file ../../src/firmware/paver/gpt.cc
zx::result<std::vector<std::unique_ptr<BlockPartitionClient>>> FindAllPartitions (FilterCallback filter)
Returns a connection to all matching partitions.
Defined at line 491 of file ../../src/firmware/paver/gpt.cc
zx::result<FindPartitionDetailsResult> FindPartitionDetails (FilterCallback filter)
Returns a connection to the first matching partition.
Defined at line 518 of file ../../src/firmware/paver/gpt.cc
zx::result<> WipeFvm ()
Wipes a specified partition from the GPT, and overwrites first 8KiB with
nonsense.
Defined at line 558 of file ../../src/firmware/paver/gpt.cc
zx::result<> ResetPartitionTables (std::vector<PartitionInitSpec> partitions)
Wipes the partition table and resets it to `partitions`.
See fuchsia.storage.partitions.PartitionsManager/ResetPartitionTables.
Defined at line 562 of file ../../src/firmware/paver/gpt.cc