Documentation
¶
Overview ¶
Package makefs provides function to format and grow filesystems.
Index ¶
- Constants
- func Ext4(partname string, setters ...Option) error
- func Ext4Repair(partname string) error
- func Ext4Resize(partname string) error
- func GUIDFromLabel(label string) uuid.UUID
- func VFAT(partname string, setters ...Option) error
- func XFS(partname string, setters ...Option) error
- func XFSGrow(partname string) error
- func XFSRepair(partname string) error
- type Option
- func WithConfigFile(configFile string) Option
- func WithForce(force bool) Option
- func WithLabel(label string) Option
- func WithPrintf(printf func(string, ...any)) Option
- func WithReproducible(reproducible bool) Option
- func WithSourceDirectory(sourceDir string) Option
- func WithUnsupportedFSOption(unsupported bool) Option
- type Options
Constants ¶
const (
// FilesystemTypeEXT4 is the filesystem type for EXT4.
FilesystemTypeEXT4 = "ext4"
)
const (
// FilesystemTypeVFAT is the filesystem type for VFAT.
FilesystemTypeVFAT = "vfat"
)
const (
// FilesystemTypeXFS is the filesystem type for XFS.
FilesystemTypeXFS = "xfs"
)
Variables ¶
This section is empty.
Functions ¶
func Ext4Repair ¶ added in v1.9.2
Ext4Repair repairs a ext4 filesystem.
func Ext4Resize ¶ added in v1.9.0
Ext4Resize expands a ext4 filesystem to the maximum possible.
func GUIDFromLabel ¶
GUIDFromLabel generates a deterministic partition GUID from a label by creating a version 8 UUID derived from a SHA-256 hash of the label bytes.
Types ¶
type Option ¶
type Option func(*Options)
Option to control makefs settings.
func WithConfigFile ¶ added in v1.10.0
WithConfigFile sets the config file for the filesystem to be created.
func WithPrintf ¶
WithPrintf sets the printf function for logging.
func WithReproducible ¶ added in v1.5.0
WithReproducible sets the reproducible flag for the filesystem to be created. This should only be used when creating filesystems on raw disk images.
func WithSourceDirectory ¶
WithSourceDirectory sets the source directory for populating the filesystem.
func WithUnsupportedFSOption ¶ added in v1.8.0
WithUnsupportedFSOption sets the unsupported filesystem option.