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. |
Click to show internal directories.
Click to hide internal directories.