blockdevice

package
v0.0.0-...-088a001 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2018 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package blockdevice provides a library for working with block devices.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockDevice

type BlockDevice struct {
	// contains filtered or unexported fields
}

BlockDevice represents a block device.

func Open

func Open(devname string) (*BlockDevice, error)

Open initializes and returns a block device.

func (*BlockDevice) Close

func (bd *BlockDevice) Close() error

Close closes the block devices's open file.

func (*BlockDevice) PartitionTable

func (bd *BlockDevice) PartitionTable() (table.PartitionTable, error)

PartitionTable returns the block device partition table.

func (*BlockDevice) RereadPartitionTable

func (bd *BlockDevice) RereadPartitionTable(devname string) error

RereadPartitionTable invokes the BLKRRPART ioctl have the kernel read the partition table.

Directories

Path Synopsis
pkg
lba
Package lba provides a library for working with Logical Block Addresses.
Package lba provides a library for working with Logical Block Addresses.
Package table provides a library for working with block device partition tables.
Package table provides a library for working with block device partition tables.
gpt
Package gpt provides a library for working with GPT partitions.
Package gpt provides a library for working with GPT partitions.
gpt/header
Package header provides a library for working with GPT headers.
Package header provides a library for working with GPT headers.
gpt/partition
Package partition provides a library for working with GPT partitions.
Package partition provides a library for working with GPT partitions.

Jump to

Keyboard shortcuts

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