Skip to content

device-setting-restore

Decides how a device setting that was changed for a capture gets put back.

A suite that flips a setting owes the device its original value back — including the case where it never had one. settings get prints the literal null for a setting that has never been written, and settings put … null does not reproduce that state: it writes the four-character string null. Restoring an unset setting takes settings delete, which is why this is a decision rather than a straight write-back.

Pure and unit-tested; the calls that carry it out live in device-settings.

InterfaceDescription
DeviceSettingRestoreDeleteRestoring a setting by removing it, because it had never been written.
DeviceSettingRestoreWriteRestoring a setting by writing its previous value back.
FunctionDescription
resolveDeviceSettingRestoreDecides how a setting read before a change is put back afterwards.
TypeDescription
DeviceSettingRestoreWhat restoring a setting requires: putting a value back, or removing it again.
EnumDescription
DeviceSettingRestoreKindHow a setting is restored.