diff mbox series

[3/4] Scripts must send a progress event

Message ID 20230228124709.2629819-3-sbabic@denx.de
State Accepted
Headers show
Series [1/4] Revert "core/stream_interface.c: increment progress step" | expand

Commit Message

Stefano Babic Feb. 28, 2023, 12:47 p.m. UTC
Scripts run as step in the update and they must signalize when they have
finished. This allows the progress interface to take count of them.

Signed-off-by: Stefano Babic <sbabic@denx.de>
---
 core/installer.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/core/installer.c b/core/installer.c
index b97e97a..4ddd8fe 100644
--- a/core/installer.c
+++ b/core/installer.c
@@ -205,7 +205,9 @@  static int run_prepost_scripts(struct imglist *list, script_fn type)
 				.data = hnd->data
 			};
 
+			swupdate_progress_inc_step(img->fname, hnd->desc);
 			ret = hnd->installer(img, &data);
+			swupdate_progress_step_completed();
 			if (ret)
 				return ret;
 		}