xfs

package
v0.1.1-0...-42241d0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2021 License: MPL-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package xfs provides functions for working with the XFS filesystem.

Index

Constants

View Source
const (
	// Magic is the XFS magic number.
	Magic = 0x58465342
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Options)

Option is the functional option func.

func WithForce

func WithForce(o bool) Option

WithForce forces the creation of the filesystem.

func WithLabel

func WithLabel(o string) Option

WithLabel sets the filesystem label.

type Options

type Options struct {
	Label string
	Force bool
}

Options is the functional options struct.

func NewDefaultOptions

func NewDefaultOptions(setters ...Option) *Options

NewDefaultOptions initializes a Options struct with default values.

type SuperBlock

type SuperBlock struct {
	Magic      uint32
	Blocksize  uint32
	Dblocks    uint64
	Rblocks    uint64
	Rextents   uint64
	UUID       [16]uint8
	Logstart   uint64
	Rootino    uint64
	Rbmino     uint64
	Rsumino    uint64
	Rextsize   uint32
	Agblocks   uint32
	Agcount    uint32
	Rbmblocks  uint32
	Logblocks  uint32
	Versionnum uint16
	Sectsize   uint16
	Inodesize  uint16
	Inopblock  uint16
	Fname      [12]uint8
	Blocklog   uint8
	Sectlog    uint8
	Inodelog   uint8
	Inopblog   uint8
	Agblklog   uint8
	Rextslog   uint8
	Inprogress uint8
	ImaxPct    uint8
	Icount     uint64
	Ifree      uint64
	Fdblocks   uint64
	Frextents  uint64
}

SuperBlock represents the xfs super block.

func (*SuperBlock) Is

func (sb *SuperBlock) Is() bool

Is implements the SuperBlocker interface.

func (*SuperBlock) Offset

func (sb *SuperBlock) Offset() int64

Offset implements the SuperBlocker interface.

func (*SuperBlock) Type

func (sb *SuperBlock) Type() string

Type implements the SuperBlocker interface.

Jump to

Keyboard shortcuts

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