fota: Modify upgrade checking function more readable 20/314720/3
authorSangYoun Kwak <sy.kwak@samsung.com>
Wed, 17 Jul 2024 10:10:17 +0000 (19:10 +0900)
committerSangYoun Kwak <sy.kwak@samsung.com>
Mon, 22 Jul 2024 03:46:02 +0000 (12:46 +0900)
commit347b2dac978839a1bb38d13649fee8a02d0628b5
tree3be67425b7ec07c53ec28a12fc0ebc15db5e2b81
parent45c4961497ede26c620d06e7c24e5a7e80db95fc
fota: Modify upgrade checking function more readable

Previously, the function is_upgrade_completed() gets no argument and
returns -1 if error, 0 if upgrade is not completed, 1 if upgrade is
completed. This might confusing since the return value does two role:
indicating error and upgrade completion.

To increase the readability, the return value is only shows if function
call is succeed or not and upgrade completion is returned using bool
type parameter "upgrade_completed".

Also, the behavior of function is changed to 'get boolean value about
upgrade is done or not', so the name of this function is changed to
get_upgrade_completed.

Change-Id: I377db07b10d42f253ca44a973b25bbf06583a27c
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
update-manager/fota/fota-installer.c