Documentation ¶
Overview ¶
Package partition provides common utils for system partition format.
Package partition provides common utils for system partition format.
Index ¶
Constants ¶
View Source
const ( MiB = 1024 * 1024 EFISize = 100 * MiB BIOSGrubSize = 1 * MiB BootSize = 300 * MiB MetaSize = 1 * MiB StateSize = 100 * MiB )
Partition default sizes.
Variables ¶
This section is empty.
Functions ¶
func Format ¶
func Format(devname string, t *FormatOptions) error
Format zeroes the device and formats it using filesystem type provided.
Types ¶
type FileSystemType ¶
type FileSystemType = string
FileSystemType is used to format partitions.
const ( FilesystemTypeNone FileSystemType = "none" FilesystemTypeXFS FileSystemType = "xfs" FilesystemTypeVFAT FileSystemType = "vfat" )
Filesystem types.
type FormatOptions ¶
type FormatOptions struct { Label string PartitionType Type FileSystemType FileSystemType Size uint64 Force bool }
FormatOptions contains format parameters.
func NewFormatOptions ¶
func NewFormatOptions(label string) *FormatOptions
NewFormatOptions creates a new format options.
Click to show internal directories.
Click to hide internal directories.