// Package bootenv provides a platform-independent interface for managing // A/B boot environments. It abstracts GRUB (x86_64) and RPi firmware // (ARM64) behind a common interface. package bootenv // BootEnv provides read/write access to A/B boot environment variables. type BootEnv interface { // ActiveSlot returns the currently active boot slot ("A" or "B"). ActiveSlot() (string, error) // PassiveSlot returns the currently passive boot slot. PassiveSlot() (string, error) // BootCounter returns the current boot counter value. BootCounter() (int, error) // BootSuccess returns whether the last boot was marked successful. BootSuccess() (bool, error) // MarkBootSuccess marks the current boot as successful. MarkBootSuccess() error // ActivateSlot switches the active boot slot and resets the counter. ActivateSlot(slot string) error // ForceRollback switches to the other slot immediately. ForceRollback() error } const ( SlotA = "A" SlotB = "B" )