diff mbox series

IPC: allow to enable programmatically -o flag

Message ID 20210125195129.1775048-1-sbabic@denx.de
State Accepted
Headers show
Series IPC: allow to enable programmatically -o flag | expand

Commit Message

Stefano Babic Jan. 25, 2021, 7:51 p.m. UTC
It is useful to control if SWUpdate stores the incoming stream from
application. This allows to rule per each single installation if SWU
must be saved or not.

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

Patch

diff --git a/core/stream_interface.c b/core/stream_interface.c
index 0205866..1ceea64 100644
--- a/core/stream_interface.c
+++ b/core/stream_interface.c
@@ -552,7 +552,7 @@  void *network_initializer(void *data)
 		/*
 		 * Check if the stream should be saved
 		 */
-		if (strlen(software->output)) {
+		if (!req->disable_store_swu  && strlen(software->output)) {
 			ret = save_stream(inst.fd, software);
 			if (ret < 0) {
 				notify(FAILURE, RECOVERY_ERROR, ERRORLEVEL,
diff --git a/include/network_ipc.h b/include/network_ipc.h
index d3d2694..2939cdc 100644
--- a/include/network_ipc.h
+++ b/include/network_ipc.h
@@ -68,6 +68,7 @@  struct swupdate_request {
 	char info[512];
 	char software_set[256];
 	char running_mode[256];
+	bool disable_store_swu;
 };
 
 typedef union {