Skip to content

io.systemd.FactoryReset

APIs to query factory reset status

Property Value
Go package github.com/rossedman/sdvarlink/systemd/latest/factoryreset
Socket /run/systemd/io.systemd.FactoryReset
Available since systemd v258
Methods · types · errors 2 · 1 · 0

Methods

GetFactoryResetMode

Report the current factory reset status

func (c *Client) GetFactoryResetMode(ctx context.Context) (*GetFactoryResetModeOut, error)

Reply

Field Type Description
mode FactoryResetMode The current factory reset mode

CanRequestFactoryReset

Returns whether requesting a factory reset is available (by invoking the factory-reset.target unit).

func (c *Client) CanRequestFactoryReset(ctx context.Context) (*CanRequestFactoryResetOut, error)

Reply

Field Type Description
supported bool

Types

FactoryResetMode

Encodes the current factory reset status

Value Description
unsupported Factory reset is not supported on this OS.
unspecified Factory reset not requested.
off Factory reset explicitly turned off.
on Factory reset is currently being executed.
complete Factory reset has been completed during the current boot.
pending Factory reset has been requested for the next boot.