makefs

package
v1.9.0-alpha.3 Latest Latest
Warning

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

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

Documentation

Overview

Package makefs provides function to format and grow filesystems.

Index

Constants

View Source
const (
	// FilesystemTypeXFS is the filesystem type for XFS.
	FilesystemTypeXFS = "xfs"
)

Variables

This section is empty.

Functions

func Ext4

func Ext4(partname string, setters ...Option) error

Ext4 creates a ext4 filesystem on the specified partition.

func Ext4Resize

func Ext4Resize(partname string) error

Ext4Resize expands a ext4 filesystem to the maximum possible.

func VFAT

func VFAT(partname string, setters ...Option) error

VFAT creates a VFAT filesystem on the specified partition.

func XFS

func XFS(partname string, setters ...Option) error

XFS creates a XFS filesystem on the specified partition.

func XFSGrow

func XFSGrow(partname string) error

XFSGrow expands a XFS filesystem to the maximum possible. The partition MUST be mounted, or this will fail.

func XFSRepair

func XFSRepair(partname, fsType string) error

XFSRepair repairs a XFS filesystem on the specified partition.

Types

type Option

type Option func(*Options)

Option to control makefs settings.

func WithForce

func WithForce(force bool) Option

WithForce forces creation of a filesystem even if one already exists.

func WithLabel

func WithLabel(label string) Option

WithLabel sets the label for the filesystem to be created.

func WithReproducible added in v1.5.0

func WithReproducible(reproducible bool) Option

WithReproducible sets the reproducible flag for the filesystem to be created. This should only be used when creating filesystems on raw disk images.

func WithUnsupportedFSOption added in v1.8.0

func WithUnsupportedFSOption(unsupported bool) Option

WithUnsupportedFSOption sets the unsupported filesystem option.

type Options

type Options struct {
	Label               string
	Force               bool
	Reproducible        bool
	UnsupportedFSOption bool
}

Options for makefs.

func NewDefaultOptions

func NewDefaultOptions(setters ...Option) Options

NewDefaultOptions builds options with specified setters applied.

Jump to

Keyboard shortcuts

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