x86: sysupgrade: refactor platform_do_upgrade
authorMatthias Schiffer <mschiffer@universe-factory.net>
Wed, 3 May 2017 07:05:25 +0000 (09:05 +0200)
committerMatthias Schiffer <mschiffer@universe-factory.net>
Mon, 29 May 2017 21:50:34 +0000 (23:50 +0200)
commita77633d36defe79d303d79397aa859319a354aac
tree9a044bd6cb4f7715a7b56e6ce548aee0229170d9
parent19b84cfff26e4feae8ce4bbbb76567474d975d59
x86: sysupgrade: refactor platform_do_upgrade

By returning early when no upgrade device can be found and handling the
SAVE_PARTITIONS=0 case differently, we can get rid of two levels of if.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
target/linux/x86/base-files/lib/upgrade/platform.sh