gpt

package
v2.0.0-...-3265299 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2024 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package gpt probes GPT partition tables.

Index

Constants

View Source
const ENTRY_SIZE = 128

ENTRY_SIZE is the size of the Entry struct.

View Source
const HEADER_SIZE = 92

HEADER_SIZE is the size of the Header struct.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry []byte

Entry is a byte slice representing the entry.h C header.

func (Entry) Get_attributes

func (s Entry) Get_attributes() uint64

Get_attributes returns attributes.

func (Entry) Get_ending_lba

func (s Entry) Get_ending_lba() uint64

Get_ending_lba returns ending_lba.

func (Entry) Get_partition_name

func (s Entry) Get_partition_name() []byte

Get_partition_name returns partition_name.

func (Entry) Get_partition_type_guid

func (s Entry) Get_partition_type_guid() []byte

Get_partition_type_guid returns type UUID.

func (Entry) Get_starting_lba

func (s Entry) Get_starting_lba() uint64

Get_starting_lba returns starting_lba.

func (Entry) Get_unique_partition_guid

func (s Entry) Get_unique_partition_guid() []byte

Get_unique_partition_guid returns partition UUID.

type Header []byte

Header is a byte slice representing the header.h C header.

func (Header) Get_alternate_lba

func (s Header) Get_alternate_lba() uint64

Get_alternate_lba returns location of the other header copy.

func (Header) Get_disk_guid

func (s Header) Get_disk_guid() []byte

Get_disk_guid returns disk UUID.

func (Header) Get_first_usable_lba

func (s Header) Get_first_usable_lba() uint64

Get_first_usable_lba returns first usable LBA for partitions.

func (Header) Get_header_crc32

func (s Header) Get_header_crc32() uint32

Get_header_crc32 returns header_crc32.

func (Header) Get_header_size

func (s Header) Get_header_size() uint32

Get_header_size returns usually 92 bytes.

func (Header) Get_last_usable_lba

func (s Header) Get_last_usable_lba() uint64

Get_last_usable_lba returns last usable LBA for partitions.

func (Header) Get_my_lba

func (s Header) Get_my_lba() uint64

Get_my_lba returns location of this header copy.

func (Header) Get_num_partition_entries

func (s Header) Get_num_partition_entries() uint32

Get_num_partition_entries returns num_partition_entries.

func (Header) Get_partition_entries_lba

func (s Header) Get_partition_entries_lba() uint64

Get_partition_entries_lba returns always 2 in primary header copy.

func (Header) Get_partition_entry_array_crc32

func (s Header) Get_partition_entry_array_crc32() uint32

Get_partition_entry_array_crc32 returns partition_entry_array_crc32.

func (Header) Get_reserved1

func (s Header) Get_reserved1() uint32

Get_reserved1 returns reserved1.

func (Header) Get_revision

func (s Header) Get_revision() uint32

Get_revision returns revision.

func (Header) Get_signature

func (s Header) Get_signature() uint64

Get_signature returns "EFI PART".

func (Header) Get_sizeof_partition_entry

func (s Header) Get_sizeof_partition_entry() uint32

Get_sizeof_partition_entry returns sizeof_partition_entry.

type Probe

type Probe struct{}

Probe for the partition table.

func (*Probe) Magic

func (p *Probe) Magic() []*magic.Magic

Magic returns the magic value for the partition table.

func (*Probe) Name

func (p *Probe) Name() string

Name returns the name of the partition table.

func (*Probe) Probe

func (p *Probe) Probe(r probe.Reader, _ magic.Magic) (*probe.Result, error)

Probe runs the further inspection and returns the result if successful.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL