lvm2

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package lvm2 probes LVM2 PVs.

Index

Constants

View Source
const LVM2HEADER_SIZE = 64

LVM2HEADER_SIZE is the size of the LVM2Header struct.

Variables

This section is empty.

Functions

This section is empty.

Types

type LVM2Header

type LVM2Header []byte

LVM2Header is a byte slice representing the lvm2_header.h C header.

func (LVM2Header) Get_crc_xl

func (s LVM2Header) Get_crc_xl() uint32

Get_crc_xl returns From next field to end of sector.

func (LVM2Header) Get_id

func (s LVM2Header) Get_id() []byte

Get_id returns LABELONE.

func (LVM2Header) Get_offset_xl

func (s LVM2Header) Get_offset_xl() uint32

Get_offset_xl returns Offset from start of struct to contents.

func (LVM2Header) Get_pv_uuid

func (s LVM2Header) Get_pv_uuid() []byte

Get_pv_uuid returns pv_uuid.

func (LVM2Header) Get_sector_xl

func (s LVM2Header) Get_sector_xl() uint64

Get_sector_xl returns Sector number of this label.

func (LVM2Header) Get_type

func (s LVM2Header) Get_type() []byte

Get_type returns LVM2 001.

func (LVM2Header) Put_crc_xl

func (s LVM2Header) Put_crc_xl(v uint32)

Put_crc_xl sets From next field to end of sector.

func (LVM2Header) Put_id

func (s LVM2Header) Put_id(v []byte)

Put_id sets LABELONE.

func (LVM2Header) Put_offset_xl

func (s LVM2Header) Put_offset_xl(v uint32)

Put_offset_xl sets Offset from start of struct to contents.

func (LVM2Header) Put_pv_uuid

func (s LVM2Header) Put_pv_uuid(v []byte)

Put_pv_uuid sets pv_uuid.

func (LVM2Header) Put_sector_xl

func (s LVM2Header) Put_sector_xl(v uint64)

Put_sector_xl sets Sector number of this label.

func (LVM2Header) Put_type

func (s LVM2Header) Put_type(v []byte)

Put_type sets LVM2 001.

type Probe

type Probe struct{}

Probe for the filesystem.

func (*Probe) Magic

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

Magic returns the magic value for the filesystem.

func (*Probe) Name

func (p *Probe) Name() string

Name returns the name of the filesystem.

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