swapstructs

package
v2.0.20 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2025 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package swapstructs provides encoded definitions for swap on-disk structures.

Index

Constants

View Source
const SWAPHEADER_SIZE = 516

SWAPHEADER_SIZE is the size of the SwapHeader struct.

View Source
const SignatureOffset = 1024

SignatureOffset is the offset of the signature in the swap header.

Variables

This section is empty.

Functions

This section is empty.

Types

type SwapHeader

type SwapHeader []byte

SwapHeader is a byte slice representing the swap_header.h C header.

func (SwapHeader) Get_lastpage

func (s SwapHeader) Get_lastpage() uint32

Get_lastpage returns lastpage.

func (SwapHeader) Get_nr_badpages

func (s SwapHeader) Get_nr_badpages() uint32

Get_nr_badpages returns nr_badpages.

func (SwapHeader) Get_uuid

func (s SwapHeader) Get_uuid() []byte

Get_uuid returns uuid.

func (SwapHeader) Get_version

func (s SwapHeader) Get_version() uint32

Get_version returns version.

func (SwapHeader) Get_volume

func (s SwapHeader) Get_volume() []byte

Get_volume returns volume.

func (SwapHeader) Put_lastpage

func (s SwapHeader) Put_lastpage(v uint32)

Put_lastpage sets lastpage.

func (SwapHeader) Put_nr_badpages

func (s SwapHeader) Put_nr_badpages(v uint32)

Put_nr_badpages sets nr_badpages.

func (SwapHeader) Put_uuid

func (s SwapHeader) Put_uuid(v []byte)

Put_uuid sets uuid.

func (SwapHeader) Put_version

func (s SwapHeader) Put_version(v uint32)

Put_version sets version.

func (SwapHeader) Put_volume

func (s SwapHeader) Put_volume(v []byte)

Put_volume sets volume.

Jump to

Keyboard shortcuts

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