From patchwork Mon Nov 22 03:15:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dominique MARTINET X-Patchwork-Id: 1557857 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20210112 header.b=i3ot4Pvp; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2607:f8b0:4864:20::f38; helo=mail-qv1-xf38.google.com; envelope-from=swupdate+bncbcwivbv7sugrbvew5sgamgqedcy4xaa@googlegroups.com; receiver=) Received: from mail-qv1-xf38.google.com (mail-qv1-xf38.google.com [IPv6:2607:f8b0:4864:20::f38]) (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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4HyC872tzJz9t0G for ; Mon, 22 Nov 2021 14:15:35 +1100 (AEDT) Received: by mail-qv1-xf38.google.com with SMTP id g12-20020a0562141ccc00b003c0322ea7b6sf15291960qvd.19 for ; Sun, 21 Nov 2021 19:15:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1637550932; cv=pass; d=google.com; s=arc-20160816; b=dcatThiGbzcamZT7AM/zgCA9x3R63iDbAsTQlbE0EPDMoSXIU0utaNUyGFwKTtLEEg x4ZumHkIB3rCIw4UYpFAo1NaQlyRZ/AV9W/fYFO9adoyfsNKGo1YLw4Xqgs7h0NlF3lF et8O0z+G+4Nlu2iwGPNnHBGVtC+wPaz08Dooji565cD4Fb2iqXnV2xtfPZg7DqifCabz TAy7FEiHk4XBpqh1Xu/L4A00KrXEwGxW/+8I9H1UCPciz7EZoE5r8Twk/FM1cnLEvqP4 EZ6Dxgk2MRS1uTjvlkbkk294H/KJjJaudFZQ7D0IhGUDIDJnxfxQyVz8/ZLkN6ur1+X1 TVGg== 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:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=HdWWyqounLxDIkee0NgojJlm1HXoRzR3pnI6ZPKK8T0=; b=LsZSjSuC304dkoaJ/7+8qIIiqGNZIZp57xFFDNmkZoaHv8IoVCWyMIBdc+8tOs11zr iBHipI0D4vFXeqeGnf4kLbhFMppB47OMrZVRaXe8DCV7noD+PR17Uy1okpdBSyuc7Do3 7Wy/y2yo0PgZTiUcWaAe9A3rJlfqwKdaAHSYOeYZuElGPouxkh9RBpMeheWimkpq8OMk o/ge1NXnLkfZoukES0wy4ZMxXd6jMGBJxqtEE8HASE1QjC9dvVZxBN3q5CjzpQ/Nw5Yz QCL4Atc+t9n4xevDGmM6E1XzQCTxegthfh6Gy0ewNyJQCQbGMkTGIWxLe/fy1LbnQklh cbwg== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of dominique.martinet@atmark-techno.com designates 35.74.137.57 as permitted sender) smtp.mailfrom=dominique.martinet@atmark-techno.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :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=HdWWyqounLxDIkee0NgojJlm1HXoRzR3pnI6ZPKK8T0=; b=i3ot4PvpAHcAhqinT4JEw7bi7aFF6GGrxFOE4YhgGPXF+rZLhgjCCvSxbHb4qP+G21 LYObIMFPI1UmbBlSHrCW9Ue8W8/6/Gw2chpLCbGwwrHwr0NoLT+sgwb8Z0S3+9joNyLZ PVhCCgBKhjwMHSh01nJT8eYfbplyLj/kb5NnqNcDcEF4upiTmKr/uNCfweJrB4ebrdAb dfFjAvLHu1JpRURdyXm4QXk0bFXbMhvAwFq8EHwUhcFLlvF4hKg7kab+/fW4yyv3qMB0 /qo4DMDc32Vt6g8ELoQle4EjOLFtNtj+wFno4xtIY9WwoP8ib1PjK6/bhdCywTVsIFdX NpwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :in-reply-to:references: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=HdWWyqounLxDIkee0NgojJlm1HXoRzR3pnI6ZPKK8T0=; b=z96iOoIoE/kX5bCEXpnF3dEJoKV488YC8Xr4+Pr77jsWILusn535RkXGWk/mo5mOtX n1JX1myKBdSJP019zzx6BX3CN8WuG4++OcQ/MMBXMNYleKkTiyeUWBd5+wKrX1f2YxFt P+tkLakGEh1YTwo+IkmeEESj66CNG82JMjNdGliPhuGS/yAo8okAqeMqnEEwE7eZcJ4f uD7UlL0fd/BBLHuZ0/Zu++s91RoHV3YPJXotIPjVc7AkIORWhsR7FjzEVcBAaq93C4OG oAgUEL9wvcJtKFfvRWkcuxtYHIUa9kqfgc6YpZFZQj8u4hxpGpO/IFdVszxYHDkdFbLJ Jpzw== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM5333Lk6MA3RZvZrMMYzst7juY0k5buRZV4oCLIo+sCCDemAt2eh2 cWN3g2YkEvIA+/JVF7eo2Mk= X-Google-Smtp-Source: ABdhPJyk898m6mjE2F8C29iZuQJ7xFhb9xTLEN7kKHzHaRQukh8oBDLJ6MH5jQ+k6NerHzuDYT3d4A== X-Received: by 2002:a05:620a:915:: with SMTP id v21mr44739579qkv.449.1637550932580; Sun, 21 Nov 2021 19:15:32 -0800 (PST) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a05:620a:1aa2:: with SMTP id bl34ls3350342qkb.11.gmail; Sun, 21 Nov 2021 19:15:32 -0800 (PST) X-Received: by 2002:a37:648f:: with SMTP id y137mr45414266qkb.101.1637550932251; Sun, 21 Nov 2021 19:15:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637550932; cv=none; d=google.com; s=arc-20160816; b=VRn2jyOAvvI2UFz5NtPLdfsoDPGlQeNIjaH+DhxIqq5buda5+broSzabdsTFjkDIHj XHEhCxUK97SSqoERw1X8K5YhYREU8LyJIFOQh9Oej4l46Uv2NyxiygGizhHx9Dtp9801 T/L3+S9VkMJJ7h96uzL5+IN8LVmorIoD3Y9TIzvzWBfHOqh0MRfMubbY4CaRABFw73B5 N2XKR4BSzaHRet/4/v6RDPzltYvDYUezp/kyA9mY0y8vSUY6Ex2swwwDxIRLOARik5aY 6elSHQL3Pj+NCCfO1llktl+5PtlPP5LoqdZxhiZxm1ueCiWdxH3FuWKXR/9npVPeNRGG ilZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=knJwT7y9r7Ml8DCt5inNSEBGfZSovczUfr/YDD0a4k0=; b=qgdC2eT4eZHd6AfQy+VQD3PtWRibGEYGp1vmPGPyZHLUqdL7xwVTZ2xIIpMEakEjgw Cmy3Xr9QaFsyBXO7msGPNDfMeL17DSG3K/hcit/KRehz/gcRV1LrNpAotsSnF5nnqD4V T5Vf4PQQNclIol52lwEeU1wqVNMuzG2H1ywt50PIAAPnrg1LNFz3VpOyIk3miCi6eYVP UjwHD2PODhNivu+d2932P3YvRGOGf3DwTr6/6qQoSzC3JMakjcVb9hdn5L8clRKEXlFJ tKdMtxZBB1Q51TLMFDSF9X62fyaF17A00WcJ5kYuWe4/27XoafGTwEfqpyzgrvPHxmyQ Hnxw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of dominique.martinet@atmark-techno.com designates 35.74.137.57 as permitted sender) smtp.mailfrom=dominique.martinet@atmark-techno.com Received: from gw2.atmark-techno.com (gw2.atmark-techno.com. [35.74.137.57]) by gmr-mx.google.com with ESMTP id w22si772606qkp.2.2021.11.21.19.15.32 for ; Sun, 21 Nov 2021 19:15:32 -0800 (PST) Received-SPF: pass (google.com: domain of dominique.martinet@atmark-techno.com designates 35.74.137.57 as permitted sender) client-ip=35.74.137.57; Received: from gw2.atmark-techno.com (localhost [127.0.0.1]) by gw2.atmark-techno.com (Postfix) with ESMTP id B129620D64 for ; Mon, 22 Nov 2021 12:15:30 +0900 (JST) Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by gw2.atmark-techno.com (Postfix) with ESMTPS id 8D92E20D67 for ; Mon, 22 Nov 2021 12:15:30 +0900 (JST) Received: by mail-pj1-f70.google.com with SMTP id gx17-20020a17090b125100b001a6f72e2dbdso5260130pjb.7 for ; Sun, 21 Nov 2021 19:15:30 -0800 (PST) X-Received: by 2002:a17:90a:4b03:: with SMTP id g3mr26407408pjh.167.1637550929605; Sun, 21 Nov 2021 19:15:29 -0800 (PST) X-Received: by 2002:a17:90a:4b03:: with SMTP id g3mr26407366pjh.167.1637550929323; Sun, 21 Nov 2021 19:15:29 -0800 (PST) Received: from pc-0115 (162.198.187.35.bc.googleusercontent.com. [35.187.198.162]) by smtp.gmail.com with ESMTPSA id z19sm6872462pfe.181.2021.11.21.19.15.29 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 Nov 2021 19:15:29 -0800 (PST) Received: from martinet by pc-0115 with local (Exim 4.94.2) (envelope-from ) id 1moznj-009EqO-Ua; Mon, 22 Nov 2021 12:15:27 +0900 From: Dominique Martinet To: swupdate@googlegroups.com Cc: Dominique Martinet Subject: [swupdate] [PATCH 3/3] suricatta: allow -c 0 to tell swupdate we do not expect any pending update Date: Mon, 22 Nov 2021 12:15:18 +0900 Message-Id: <20211122031518.2201903-3-dominique.martinet@atmark-techno.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211122031518.2201903-1-dominique.martinet@atmark-techno.com> References: <20211122031518.2201903-1-dominique.martinet@atmark-techno.com> MIME-Version: 1.0 X-Original-Sender: dominique.martinet@atmark-techno.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of dominique.martinet@atmark-techno.com designates 35.74.137.57 as permitted sender) smtp.mailfrom=dominique.martinet@atmark-techno.com 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: , Signed-off-by: Dominique Martinet --- This one probably deserves some justification: we're not using the built in state mechanism though bootloader env, because we have two uboot images that each have its own env, so the builtin setenv would not necessarily update the correct environment (the logic would require updating both or having a shared env really, but it's not practical for uboot updates that might change some default value) In these conditions restarting with -c 1-3 works but prints a warning if no update is available on server; conversely not passing any -c will print an error that state could not be read from env. Having -c 0 basically acts exactly like no -c, except it'll not print that error. suricatta/server_hawkbit.c | 1 + 1 file changed, 1 insertion(+) diff --git a/suricatta/server_hawkbit.c b/suricatta/server_hawkbit.c index 70f402645a16..1bf23baf5211 100644 --- a/suricatta/server_hawkbit.c +++ b/suricatta/server_hawkbit.c @@ -1753,6 +1753,7 @@ server_op_res_t server_start(char *fname, int argc, char *argv[]) */ update_state = (unsigned int)*optarg; switch (update_state) { + case STATE_OK: case STATE_INSTALLED: case STATE_TESTING: case STATE_FAILED: