This allows platform code to check if firmware image can be used with
preserving a backup. It may be used e.g. when installing vendor
firmwares that won't restore appended backup archive.
Suggested-by: Luis Araneda <luaraneda@gmail.com>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
VALID=1
FORCEABLE=1
+ALLOW_BACKUP=1
# Mark image as invalid but still possible to install
notify_firmware_invalid() {
FORCEABLE=0
}
+# Mark image as incompatible with preserving a backup
+notify_firmware_no_backup() {
+ ALLOW_BACKUP=0
+}
+
# Add result of validation test
notify_firmware_test_result() {
local old_ns
json_close_object
json_add_boolean valid "$VALID"
json_add_boolean forceable "$FORCEABLE"
+ json_add_boolean allow_backup "$ALLOW_BACKUP"
json_dump -i
json_set_namespace $old_ns