Documentation
¶
Overview ¶
Package swapstructs provides encoded definitions for swap on-disk structures.
Index ¶
- Constants
- type SwapHeader
- func (s SwapHeader) Get_lastpage() uint32
- func (s SwapHeader) Get_nr_badpages() uint32
- func (s SwapHeader) Get_uuid() []byte
- func (s SwapHeader) Get_version() uint32
- func (s SwapHeader) Get_volume() []byte
- func (s SwapHeader) Put_lastpage(v uint32)
- func (s SwapHeader) Put_nr_badpages(v uint32)
- func (s SwapHeader) Put_uuid(v []byte)
- func (s SwapHeader) Put_version(v uint32)
- func (s SwapHeader) Put_volume(v []byte)
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_version ¶
func (s SwapHeader) Get_version() uint32
Get_version returns version.
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.
Click to show internal directories.
Click to hide internal directories.