diff mbox series

[1/3] Connect the internal data tree to the shared data structure

Message ID 20201117094122.2153374-1-sbabic@denx.de
State Accepted
Headers show
Series [1/3] Connect the internal data tree to the shared data structure | expand

Commit Message

Stefano Babic Nov. 17, 2020, 9:41 a.m. UTC
The parser generates an internal representation how the update should
run and store it into a struct swupdate_cfg. This connects the shared
object "installer" to the internal database to retrieve information
about the update via IPC.

It is thought that the database is for IPC just read-only and no direct
access is allowed.

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

Patch

diff --git a/core/stream_interface.c b/core/stream_interface.c
index 89ae52e..7df33ec 100644
--- a/core/stream_interface.c
+++ b/core/stream_interface.c
@@ -482,6 +482,7 @@  void *network_initializer(void *data)
 	memset(&inst, 0, sizeof(inst));
 	inst.fd = -1;
 	inst.status = IDLE;
+	inst.software = software;
 
 	/* fork off the local dialogs and network service */
 	network_thread_id = start_thread(network_thread, &inst);
diff --git a/include/installer_priv.h b/include/installer_priv.h
index 1a7013a..d406f27 100644
--- a/include/installer_priv.h
+++ b/include/installer_priv.h
@@ -18,6 +18,7 @@  struct installer {
 	int	last_error;		/* error code if installation failed */
 	char	errormsg[64];		/* error message if installation failed */
 	struct swupdate_request req;
+	struct swupdate_cfg const *software;
 };
 
 #endif