layout

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

View Source
const (
	RafsV5                 string = "v5"
	RafsV6                 string = "v6"
	RafsV5SuperVersion     uint32 = 0x500
	RafsV5SuperMagic       uint32 = 0x5241_4653
	RafsV6SuperMagic       uint32 = 0xE0F5_E1E2
	RafsV6SuperBlockSize   uint32 = 1024 + 128 + 256
	RafsV6SuperBlockOffset uint32 = 1024
	RafsV6ChunkInfoOffset  uint32 = 1024 + 128 + 24
	BootstrapFile          string = "image/image.boot"
	LegacyBootstrapFile    string = "image.boot"
	DummyMountpoint        string = "/dummy"
)
View Source
const MaxSuperBlockSize = 8 * 1024

RafsV6 layout: 1k + SuperBlock(128) + SuperBlockExtended(256) RafsV5 layout: 8K superblock So we only need to read the MaxSuperBlockSize size to include both v5 and v6 superblocks

Variables

This section is empty.

Functions

func DetectFsVersion

func DetectFsVersion(header []byte) (string, error)

Types

type ImageMode

type ImageMode int
const (
	OnDemand ImageMode = iota
	PreLoad
)

Jump to

Keyboard shortcuts

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