system: reject sysupgrade of broken firmware images
authorRafał Miłecki <rafal@milecki.pl>
Fri, 30 Aug 2019 15:46:07 +0000 (17:46 +0200)
committerRafał Miłecki <rafal@milecki.pl>
Wed, 4 Sep 2019 04:21:18 +0000 (06:21 +0200)
commitf55c23519e3aeffb606f9f68a2c4fa435de84e72
tree27d3eb0664aef6dd265e1d6711a65c3b209c541d
parente990e215e8a3be21bc7d32c7df9fa1993ecf8163
system: reject sysupgrade of broken firmware images

This uses recently added "validate_firmware_image" to validate passed
firmware. If it happens to be invalid and marked as impossible to force
then sysupgrade simply exits with an error.

This change is needed to avoid bricking devices with some totally broken
images.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
system.c