From patchwork Mon Jan 25 19:51:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 1431365 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::43f; helo=mail-wr1-x43f.google.com; envelope-from=swupdate+bncbcxploxj6ikrbr6cxsaamgqehtd3aai@googlegroups.com; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20161025 header.b=LEqET7DH; dkim-atps=neutral Received: from mail-wr1-x43f.google.com (mail-wr1-x43f.google.com [IPv6:2a00:1450:4864:20::43f]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DPgVN35jrz9sCq for ; Tue, 26 Jan 2021 06:51:39 +1100 (AEDT) Received: by mail-wr1-x43f.google.com with SMTP id u3sf9944732wri.19 for ; Mon, 25 Jan 2021 11:51:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1611604295; cv=pass; d=google.com; s=arc-20160816; b=X7HDK5yPglbd5BeZUDj0ijfhc2k8+ervDbaS8HNOZycvlXONYkoubiDQ8VTjsiypfV 0qJCDLLIEBYjdM4QPNhdNkq6QR0+wcdNy9eEii/tBEBTQg2GkMoqYN+URmU3R4rDtWe9 HrWFBhj9AVBx/CAU7GOIjmEGAunsyYXY46vEFGV5+niD2iAFAPh4WpYrDKBEpm44+9xk Piv1KaPg7cvxvH6t2sk+jUy1UOKDvqcdjSXpmAm3PwFWk2dHjk9eDMUIW3QTUII2M55r xO1ouVJ10RxaoSATdB3ERsOqksT2rxAn7pr816v+3O6dgL3tvmbJKLycoMdD79DDEHx5 rViA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:message-id:date :subject:cc:to:from:sender:dkim-signature; bh=4kvqIc00498LHNFrqff5m3hIdEGap6E7xYzYBjHajUk=; b=g28jTMvkN5/3P99Pya0RFU5+JUfHpbQXafde1+v36tjGePGsvpdM16GT1tlJyN4fLD AbZVxZn/I4omWX6ta8vkj1mUai0M69l8pLz7jxAHrU9mKDi/CJN5XJl4DqMu/LeOrI4W N9XFfq0I7CQvf7jZgNL6wXJVGFHVKXvLLxX0bmzMucJHaJE4c36zvRM34f7RdrtuI2CF tkMshnkVXUbGttQshNC5o7P+x0UhmUaiN3XkILBUJ/ju/q9E1v2Jq5tv4o30z63OSoyO d2xmML95c4MijWwJjN7J/O254Jr12Z8exkNKJs5/BuC1l9loRw3+5cj8jbmPeBNA1cbJ OtZA== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=4kvqIc00498LHNFrqff5m3hIdEGap6E7xYzYBjHajUk=; b=LEqET7DHZbjs/gQUo1rzXD7P97DVTsm14xYenLwYBs/cdmcE+r4cODQgcfpXO8huM4 d00koHo+XBmc8TUGoIFQ9ltcEcUo1YRq/50XprQ8IZiRC7T37Uepn2ifQW3OQk39pPMg kKklP4DMqSuNG87vqN4c3En158dVIpjNeI5bhbpXwYyJBVihR6mHawjd+phjMbOz/WMC mAqb6k6kODuJ+eyTw4d1Br0XlZhiXipAXKtiNcT2hU69zgVboG6S47ZezPSq7AyNVPEA RhgrUcymvvXmHjNxmTH6pM90KUfikVBc/Ixrauqfv5CuAU4uVAGK/ApypA2ajXmChnCa peIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=4kvqIc00498LHNFrqff5m3hIdEGap6E7xYzYBjHajUk=; b=kOOY45xyex0aao5heUjFjVV9V7SPgbihHVS+uMrZAApNRTeV2mGVjdbmLSTHbNrWXw jbWT5RR7V6iisIUHyaCFf1KyD1xQw03J+rFaNXW3E8/74yBE8JX8tcw3d3ojD7ckB7Jz JXTgu6NUrQMkXeQq0pI5HdyAORWfgyY0CTxVWR/lbvPOeafNGSwWKXyf4a6TX+Mvn2aq 63jO2XQspzDPwlXotNIexL2a+YMpQ3ea3OjA/9SViXrQaKId+B8exp2IL7hLHtOITGF8 uYn0OuIvA2w77vpafGSgT70ZaImEYIKNvxmcihHosSCRHaHv76VtxBplFm8hqlnGysMs pJHA== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM533ecX2uVNVVqxy5T38Y4tPeeS58gwsdV5C930J9P99b8kC8Yk6H JytXYRp9Z+KlZ3plk4W570Y= X-Google-Smtp-Source: ABdhPJwUZsADegmPjZAML3bNZ+bsNgtjAKw8eLVg9grHbG9YL4Fai1jofa9THCy2uUCcGboGoHjBAw== X-Received: by 2002:a05:6000:186f:: with SMTP id d15mr2688156wri.237.1611604295840; Mon, 25 Jan 2021 11:51:35 -0800 (PST) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a1c:4482:: with SMTP id r124ls137993wma.1.canary-gmail; Mon, 25 Jan 2021 11:51:35 -0800 (PST) X-Received: by 2002:a05:6402:ca9:: with SMTP id cn9mr1898227edb.208.1611604295001; Mon, 25 Jan 2021 11:51:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611604294; cv=none; d=google.com; s=arc-20160816; b=0VpyylmaqrAeF4wEf07GJgYsW+wXiNS8hEJfC/3KsiPNnhrO1WriyIl8f/BHLzJFHL GUqILEVsJZoXcbvY0ZAktarOQqkKQPtK+4TzihV5wbnw7MEj5XNakeg47CimFgrL11Xt TCX9wayxHvsqS7rSRL8LLg41/SpcXEPNtrH+f5EnpNtWoUnR8gAOjnDnD796ZV7X/xUF pAA2+rAvpgCF2GzkN9zpkiDIpm4XdcIdvwPpX47rwuDtT8u5k03j8OrHIVEPybnFEVV8 XmuciKJfzPtR5wvuoocM4qeX87Bm0C+ODDYhIc1WUVv+RlRSdOYm4/cMJAsz+mxp8MX4 bHTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from; bh=6iu58yhqfL0kPfMMg4P1ChhopdHbHjvTmiPU/LtPto8=; b=Sd8fqKxErzalftW7AZh5vUuILKHsf69o2PMWDvn4Xza2V3U4Ni8ZqgzIbjLDU/Kulr s0b9hHEbf0Bzmsvaw8v0tka3obUGVDmXuntF2Q6W56s5kQbWlVViwVPRJrLnbK8GATXk 7grWti/SqJxWtrmClV+qEVJQptvYY3szTK5gAgr2FpJoKmxl8FSL/5ptUhpKrpjn9lh3 hxwWBByS6h8jFDH73JNi/EXZI+SVQJ+BXZG446bx9dwqyATyB0IJQ5Qq+rweWNR315dQ DT8O9TJTB2jcZdLxmpSSz6k4sShAIJN37vvsR0mAbCi5rZJgreNDGsFfuCdME/eRVf2H k3vg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Received: from mail-out.m-online.net (mail-out.m-online.net. [2001:a60:0:28:0:1:25:1]) by gmr-mx.google.com with ESMTPS id i17si552569ejf.0.2021.01.25.11.51.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jan 2021 11:51:34 -0800 (PST) Received-SPF: neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) client-ip=2001:a60:0:28:0:1:25:1; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4DPgVG5MQfz1rwmn; Mon, 25 Jan 2021 20:51:34 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4DPgVG57CXz1s8Tc; Mon, 25 Jan 2021 20:51:34 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id 6wDQptI_N1pA; Mon, 25 Jan 2021 20:51:34 +0100 (CET) Received: from babic.homelinux.org (host-88-217-136-221.customer.m-online.net [88.217.136.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Mon, 25 Jan 2021 20:51:34 +0100 (CET) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id 8DCAB4540D34; Mon, 25 Jan 2021 20:51:33 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([127.0.0.1]) by localhost (mail.babic.homelinux.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qepIoNsdnG8B; Mon, 25 Jan 2021 20:51:31 +0100 (CET) Received: from paperino.arri.de (paperino.fritz.box [192.168.178.64]) by babic.homelinux.org (Postfix) with ESMTP id 31A014540D1C; Mon, 25 Jan 2021 20:51:31 +0100 (CET) From: Stefano Babic To: swupdate@googlegroups.com Cc: Stefano Babic Subject: [swupdate] [PATCH] IPC: allow to enable programmatically -o flag Date: Mon, 25 Jan 2021 20:51:29 +0100 Message-Id: <20210125195129.1775048-1-sbabic@denx.de> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Original-Sender: sbabic@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 2001:a60:0:28:0:1:25:1 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , 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 --- core/stream_interface.c | 2 +- include/network_ipc.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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 {