info

package
v0.0.0-...-75e4d2d Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

DLC constants and helpers

Partition constants and helpers

Index

Constants

View Source
const (
	DlcCacheDir    = "/var/cache/dlc"
	DlcImage       = "dlc.img"
	DlcLibDir      = "/var/lib/dlcservice/dlc"
	DlcPackage     = "package"
	DlcVerified    = "verified"
	DlcserviceUtil = "dlcservice_util"
)
View Source
const (
	LaCrOSRootComponentPath = "/var/lib/imageloader/lacros"
	LaCrOSPageSize          = 4096
)
View Source
const (
	PartitionNumKernelA = "2"
	PartitionNumKernelB = "4"
	PartitionNumRootA   = "3"
	PartitionNumRootB   = "5"
	PartitionNumMiniOSA = "9"
	PartitionNumMiniOSB = "10"
)
View Source
const (
	StatefulPath           = "/mnt/stateful_partition"
	UpdateStatefulFilePath = StatefulPath + "/.update_available"
	// ProvisionMarker - This file acts as a flag to signal failed provisions.
	// As we create the file in stateful, that means that if provision
	// is successful it will be overwritten, meaning that the fact it exists
	// beyond a provision run means it must have failed.
	// This file should be created on every OS provision start.
	ProvisionMarker = "/var/tmp/provision_failed"
)
View Source
const (
	MiniOSUnsupportedGUIDPartition = "09845860-705F-4BB5-B16C-8A8A099CAF52"
)

Variables

View Source
var ActiveDlcMap = map[string]string{PartitionNumRootA: dlcSlotA, PartitionNumRootB: dlcSlotA}
View Source
var InactiveDlcMap = map[string]string{PartitionNumRootA: dlcSlotB, PartitionNumRootB: dlcSlotB}

Functions

func GetMiniOSPartitions

func GetMiniOSPartitions() []string

Types

type PartitionInfo

type PartitionInfo struct {
	// The active + inactive kernel device partitions (e.g. /dev/nvme0n1p2).
	ActiveKernel      string
	ActiveKernelNum   string
	InactiveKernel    string
	InactiveKernelNum string
	// The active + inactive root device partitions (e.g. /dev/nvme0n1p3).
	ActiveRoot   string
	InactiveRoot string
	// The A + B miniOS device partitions.
	MiniOSA string
	MiniOSB string
}

partitionsInfo holds active/inactive root + kernel partition information.

func GetPartitionInfo

func GetPartitionInfo(root string, rootDisk string, rootPartNum string) PartitionInfo

GetPartitionInfo retrieves relevant kernel and root info for a specific root

Jump to

Keyboard shortcuts

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