sgdisk

package
v0.35.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Operation

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

func Begin

func Begin(logger *log.Logger, dev string) *Operation

Begin begins an sgdisk operation

func (*Operation) Commit

func (op *Operation) Commit() error

Commit commits an partitioning operation.

func (*Operation) CreatePartition

func (op *Operation) CreatePartition(p types.Partition)

CreatePartition adds the supplied partition to the list of partitions to be created as part of an operation.

func (*Operation) DeletePartition added in v0.26.0

func (op *Operation) DeletePartition(num int)

func (*Operation) Info added in v0.26.0

func (op *Operation) Info(num int)

func (*Operation) Pretend added in v0.26.0

func (op *Operation) Pretend() (string, error)

Pretend is like Commit() but uses the --pretend flag and returns the output on stdout for parsing.

Note: because sgdisk does not do any escaping on its output, callers should ensure

the partitions' labels do not have any nasty characters that will interfere
with parsing (e.g. \n)

func (*Operation) WipeTable

func (op *Operation) WipeTable(wipe bool)

WipeTable toggles if the table is to be wiped first when commiting this operation.

Jump to

Keyboard shortcuts

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