From patchwork Tue Feb 28 12:47:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 1749441 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::339; helo=mail-wm1-x339.google.com; envelope-from=swupdate+bncbcxploxj6ikrbvpp66pqmgqewh5okwq@googlegroups.com; receiver=) Authentication-Results: legolas.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=k/w3I3BN; dkim-atps=neutral Received: from mail-wm1-x339.google.com (mail-wm1-x339.google.com [IPv6:2a00:1450:4864:20::339]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PQxwF6NJ9z245k for ; Tue, 28 Feb 2023 23:47:24 +1100 (AEDT) Received: by mail-wm1-x339.google.com with SMTP id e17-20020a05600c219100b003e21fa60ec1sf4216434wme.2 for ; Tue, 28 Feb 2023 04:47:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1677588438; cv=pass; d=google.com; s=arc-20160816; b=Hb9QAD3YGvMeenBsMUiTKeXqPTEmEswUuXgJ9bFRzurHrHgIlrf31kX9UDkpgPm6LO Gtup5nTWwOJi4vKeQVBgUvbdJTvL7L3oFAMt8y39+CKraephB0CKQtsQAJHMgP2j0gcA Oaxw3gj/H8B4UbMcJ95/uX6F+FlYF1Xm/bYasWa2vPNTi6Czv5AS8RidlSMSO3Nm8+xT psdchiixxwmAvfWN6lHqsbPveVZeGLL5yUYpZbTPiYVWBdXJEHi75Ll3rVHTTjd7eYhC lymAzpARNtp9Mn2uInyB8Iy8LUYkRZDMMAy6u1qcpzW3Hx4LkcUVxqRCMfJK9RGvLULE driA== 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=mLdEsYaKe1RVAiXWQzZsXjCP3uyarhSwlB5vi+CZN0Y=; b=AL8VF3hiphhQb0Op/t7LbzdDmqjlu0s5yIwHhUA5yJFzYwzLw3HV/Fdxt+ZGcyi2+Q HG6UtKLNYWt2FIywW5ESB3NVKzoZKE5jx+bM6w17/ZdlD8EdikEQD0Ob2egNGtz2LNdR fXlE1ghO4NVLIcMhUwd605BFWWDKRJNgpcQO4n5/c2eOpu8ZRkm0Ndl7WIR5wDjwhaz2 CWUiB3PvC6Rsx2Ur5ORB7FSJUVMS/cirJ0mDkGGvEC2/nENsmTW5AG9L+rDf1QGbJFlG 15/VRZX3RC9DBzeNNM3rnWqsF+HQMWhGrYjh4GF+vxLEiptMZb7XouBaqKiNujZECGTG 527g== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; t=1677588438; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:message-id:date:subject:cc:to:from :sender:from:to:cc:subject:date:message-id:reply-to; bh=mLdEsYaKe1RVAiXWQzZsXjCP3uyarhSwlB5vi+CZN0Y=; b=k/w3I3BNY8Ys+dPQ/XC+79u9hbgrBooJv/gCdg0+uvhdnommoeWQG3u0PX1u/h0V35 wBEx6MScEJP+ku7qwQjp7VeWTpd1FWT3+VdiUJZ7rG5TPFmqInk7e/incsrIHt/1Tuqi MPv+57CLxElkWeBT5UmqLaLqDYpocsEMNzyabxMJj+J8u8RxjhLj8dF25it8qvyjHcC7 dpdXhqD6OjQvUaW5f6lWrOTPCRVTdnQm4tUfdooI9D7KvXXciIOVIGk5yX4Ln8GFTRC9 tboPsYXLtIQKUKwjOlPCjHCP98b0eaoqSX3y2JoIefnth69VpgiSHlw/8LnJq4a4Zhr5 KpDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677588438; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :message-id:date:subject:cc:to:from:x-gm-message-state:sender:from :to:cc:subject:date:message-id:reply-to; bh=mLdEsYaKe1RVAiXWQzZsXjCP3uyarhSwlB5vi+CZN0Y=; b=0VBKCsVmEorwnDDbQQB7AFkG1PkU4UMlrofaXO+FH3t0D5zrLnVoN3VHUpsGZ6XnWb 9AEjizgHRqqeP89lL44qQgQOJnF6OCHXWi1TDmOFAnuYAaarCfaRR4Km+BbWkpHrOhua Z98a78Ns/3X74eqTGLs3Zn/Cp3pu6HeaXzCLsQvJWTlqf20vayn2wHhi8X5Lv/XqvA2h uvT+9Q4tUKP6o7wG/z9DNjMkGCWSGrDoWMABr8ioPcBuew/FuCaYLqUqLPHgCAmqOq8r U19aLEE5QfEicgb5d8CPFcAaNLDjnDuy4dh7q8co6zn6ulQ1cQ6lGOfS00KiC5rWiFdP a9nA== Sender: swupdate@googlegroups.com X-Gm-Message-State: AO0yUKVBJ/LORZGMozyCR5J9y1g+OPfsSMorxNQVtTz/J82hE1LgeZEU flPlziQM8d8Kcqqn64WnjnA= X-Google-Smtp-Source: AK7set8+BwJKNL8XlNKK/fDT9wjcNAoEmkOqShISwYteqOsRiAT/VJYKRGh5wuL3UBrtuPvFo7ITCA== X-Received: by 2002:a05:600c:3110:b0:3eb:122f:f3c0 with SMTP id g16-20020a05600c311000b003eb122ff3c0mr751821wmo.5.1677588437720; Tue, 28 Feb 2023 04:47:17 -0800 (PST) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a05:600c:5128:b0:3e2:19b0:7006 with SMTP id o40-20020a05600c512800b003e219b07006ls6348663wms.3.-pod-control-gmail; Tue, 28 Feb 2023 04:47:16 -0800 (PST) X-Received: by 2002:a05:600c:310c:b0:3eb:3e75:5d6e with SMTP id g12-20020a05600c310c00b003eb3e755d6emr2182529wmo.18.1677588436163; Tue, 28 Feb 2023 04:47:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677588436; cv=none; d=google.com; s=arc-20160816; b=e5IO4iWviEeFI841/u0BKw4jM0xm9hqvMq2u0ojPqPnsv7W7FKTM6eTxjxFnSHP1zy w3q1/xflR2OAnoAGNpHoiQG7boOrFBdK8xeji54T/7JT6CeI7JOyibuNoN7lcWithHTw 8pIUVeRR5FGqD0Y7JfKkqoFaIFrIbJxB2+sOr2ncNEGVBVpKF5GR9zGL0PS5+1XclBX+ 30dLtIurEtwkjQBz3lbRrWH2ngMq1jFyN9iVcE/DAbzUCDXeT+HLGR79doglMyhue/vK gclrfuux6Hb8HUJzNoiYSI8hmLaSPn4ARvK8MwkZc/aCpJhfd5oasz3YguCFKnva3Weq jQIg== 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=YESg0dBL+WNJLGyCyjr+0ant5koGhZet5k2bvhQlRNc=; b=bF6MRt85WdyR+bszPsGslRrIh1nxmUqC6KDL2WEpwglhoJrCHpennkAI9a5i243kbS 8WXRcU3o5WpUqHVASKptQ64ZOBOy97MSobX5czca0wVhGxsMxsNK7YI7oWBSuxkNq358 fh4uG6SVSa9b2NDsq+6CEbmfo3CTRHu3nuotsZzp8JTSWR+1sm4xwzE9WCu2DjPgCgEX 8Tygf60tb7M7B2j5DDcIKS9jN3OeDozZpHNgcjbhSxYaX+hmkjEabAswNvKLwwdK1k8T paqDN2HpO/gf73taEQlJIyc6+Ai3ufkGNFA/kSMK/gnzFp4ohDSVPxRcisjwhL9ANLQd t8Aw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Received: from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.10]) by gmr-mx.google.com with ESMTPS id e15-20020adffc4f000000b002c5995fb581si297261wrs.6.2023.02.28.04.47.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Feb 2023 04:47:16 -0800 (PST) Received-SPF: neutral (google.com: 212.18.0.10 is neither permitted nor denied by domain of sbabic@denx.de) client-ip=212.18.0.10; Received: from frontend03.mail.m-online.net (unknown [192.168.6.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4PQxw35pFxz1sB8D; Tue, 28 Feb 2023 13:47:15 +0100 (CET) Received: from localhost (dynscan3.mnet-online.de [192.168.6.84]) by mail.m-online.net (Postfix) with ESMTP id 4PQxw35WByz1qqlR; Tue, 28 Feb 2023 13:47:15 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan3.mail.m-online.net [192.168.6.84]) (amavisd-new, port 10024) with ESMTP id 6i3XHC0wWmhZ; Tue, 28 Feb 2023 13:47:15 +0100 (CET) Received: from babic.homelinux.org (host-88-217-136-221.customer.m-online.net [88.217.136.221]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Tue, 28 Feb 2023 13:47:15 +0100 (CET) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id D034A4541256; Tue, 28 Feb 2023 13:47:14 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([IPv6:::1]) by localhost (mail.babic.homelinux.org [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id 8ZRG-FZ0mhNi; Tue, 28 Feb 2023 13:47:12 +0100 (CET) Received: from paperino.fritz.box (paperino.fritz.box [192.168.178.48]) by babic.homelinux.org (Postfix) with ESMTP id 7C03145406F2; Tue, 28 Feb 2023 13:47:12 +0100 (CET) From: Stefano Babic To: swupdate@googlegroups.com Cc: Stefano Babic Subject: [swupdate] [PATCH 1/4] Revert "core/stream_interface.c: increment progress step" Date: Tue, 28 Feb 2023 13:47:06 +0100 Message-Id: <20230228124709.2629819-1-sbabic@denx.de> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Original-Sender: sbabic@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 is neither permitted nor denied by 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: , This reverts commit f23f950b3852af84cfb6057143072a59d714b6f2. commit f23f950 seems to have fixed the wrong count of steps for progress, but it has just increased arbitrary the value. The cause was different, and scripts and partitions are not counted as scripts. Signed-off-by: Stefano Babic --- core/stream_interface.c | 1 - 1 file changed, 1 deletion(-) diff --git a/core/stream_interface.c b/core/stream_interface.c index 9ba6332..73990cc 100644 --- a/core/stream_interface.c +++ b/core/stream_interface.c @@ -681,7 +681,6 @@ void *network_initializer(void *data) notify(FAILURE, RECOVERY_ERROR, ERRORLEVEL, "Image invalid or corrupted. Not installing ..."); } - swupdate_progress_inc_step("", ""); swupdate_progress_end(inst.last_install); /* From patchwork Tue Feb 28 12:47:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 1749438 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::437; helo=mail-wr1-x437.google.com; envelope-from=swupdate+bncbcxploxj6ikrbvxp66pqmgqeffrwema@googlegroups.com; receiver=) Authentication-Results: legolas.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=sEJWx/5a; dkim-atps=neutral Received: from mail-wr1-x437.google.com (mail-wr1-x437.google.com [IPv6:2a00:1450:4864:20::437]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PQxwF5dzQz240f for ; Tue, 28 Feb 2023 23:47:24 +1100 (AEDT) Received: by mail-wr1-x437.google.com with SMTP id x3-20020a5d6503000000b002c8c421fdfasf1538810wru.15 for ; Tue, 28 Feb 2023 04:47:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1677588438; cv=pass; d=google.com; s=arc-20160816; b=D1a7RhjVtSqXJ7Y1MeYjHTR8BDz5qUjKJ0TPUPpqMqn2L7biON7uu7vw1o6U43+uSh 0+IIVTz11VHI2WS84wC8xqfXPAlXhWdSMZY2qrQkzVuq55DJ07PakLnvx6Nd7lIkUlD5 od0fhy/1gWVWesmzDzsqdciuB9p8CNui4+czatXRR79KSKpZBk0Spza/J5c59qC25NnS oiisLZsLcN8WHjJ4iaDlZmhE5ygB5JehG8FwUD1Xd0T1MIGGNXIVCtbNYsjIXsoalCN7 YcrUWmBfX+Fz5IdRqCAEo2cT2qRfjHeShNo6Idin6bAFYO8/Y898/b6f+9Ik8POHrqWR mv7A== 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=9BXorC3xX+zVFQv3iVenarWAHwBhl3tnPGlDYnNwtY0=; b=Re4OiDndB0nG/Dn9ms7YKK5BSrnZnodHvPMP4w0RTGk0Jcaq6XjlXZTawbT3HSKKmo 2CsUmZ/dqjnm43G3xJdvvuMGhn7/tuae08H5HjkXPyfW4a+pNGzyDp7hUoT/5YOdk4nQ koqkZiVWkEGEpiZfoq+sFK8uSwNbnmxk8WDpHhnbIvuJdiioMCGrXRAs0zSILzTlPmPM R38t01GIz3nIiePEZeJtI/iYYU9/pKak2y2HJwytCYaskrsa9sXoB0CsoH0zVxXzkamA nuiDD/z4EzkX6xtvZjlg5vF+QxMZNv2LylPyz4DcPLIrO6Ekq1cidy18SKZ1p+esheC/ Uy2w== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; t=1677588438; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=9BXorC3xX+zVFQv3iVenarWAHwBhl3tnPGlDYnNwtY0=; b=sEJWx/5aO/lfoKllJNlC0Ne1Pwrp3dM6s+CHFrVScmSha0bCNjaJNuURnntEwGZTe4 LzoTvoamu6jEnrOJgwBXNtLG45STP/6A7F+AOGp43JQPQCpfMIGzDfDzipgAwODFrKJU +4iiWW4XXgflL9G5sGfHO9VjiXr6EuulvBLS2rE1mZCYFFJ4VWppfKZydruSeBGDcCAA id9gMAumw2O2FPPj+2TqHtEwbd1h5PTzdaB91HsLGepKCl2JhqMIOIsZvffwQTrEOCUJ vZp9qP5/+Ot50uW5CYbsIVY26WH5WTn+ztqVJaJ/sgv7D7K2XkEpcicEL3f0aoD00tf8 0h1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677588438; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=9BXorC3xX+zVFQv3iVenarWAHwBhl3tnPGlDYnNwtY0=; b=cXudB1iEVrOT6p3+Q13yUVFlXHImRy4ft7/l3MI8X6zYlgcHbetA8mNRDjBNIZTbC/ CZl3O5jfIs96oEOqlBAjnh3Y7k9xIgJ5jRRmsO9zUakGCvjQQ9IGKm3YHzUTerg7FtVR n513slfQA4tXYa+hlRvz6XrY1rCoOmHPaTYUMzBeVs8IBGIYs0DVQhX9LGaBkvpuCxzT V3hfUh/ka2oUh1Y4aOrOp8lRqBkPBfQgQeUbc7O4qz8GaNZhHP9NqgUwlOQP9mj2l4Fk wDP/qoChXgJew18wLEg+0QHF9g+e98jFXKzkW1/GgfC57XU5dkMi6+PIiEJs0zueR3Q9 qlfw== Sender: swupdate@googlegroups.com X-Gm-Message-State: AO0yUKUwGVHt9t76rNvbJzzDdm+upbQh7qqGWSywG8Iz4DeBGx3F0AF3 2M2IrtJ7EXManKc2p+jHpes= X-Google-Smtp-Source: AK7set8s9W+OQqSi0C3BXbzjT4OcLBs43LFZlTTHTi6OvFizmJKl5rXUfyyB+Oed+08wCDbBmnlSKg== X-Received: by 2002:a5d:6a11:0:b0:2cc:4dac:fe57 with SMTP id m17-20020a5d6a11000000b002cc4dacfe57mr536438wru.13.1677588438539; Tue, 28 Feb 2023 04:47:18 -0800 (PST) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a05:600c:5128:b0:3e2:19b0:7006 with SMTP id o40-20020a05600c512800b003e219b07006ls6348700wms.3.-pod-control-gmail; Tue, 28 Feb 2023 04:47:17 -0800 (PST) X-Received: by 2002:a05:600c:3ca5:b0:3ea:25b9:c518 with SMTP id bg37-20020a05600c3ca500b003ea25b9c518mr2074508wmb.5.1677588437398; Tue, 28 Feb 2023 04:47:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677588437; cv=none; d=google.com; s=arc-20160816; b=dNLpY/l4Zh1O4O6fuyS0tjKe7lzvrNHuzSGLWNfGdymFs+5OnQN823oYksxhirtUpu 4t3ZKwyzmUAN+DBHF/iv3A6JZCCQjjA5L6VpsT/h+n9XBfrQq5QbzyaBO8WDk22iGVCa OYZq5iFglQYPstHxZfob/4fm7bJq4Qy10vyuoZ9ORvdVqLJa5IdP3D8l+jCyjsiwKdY+ JAoby8ihfla4WgddeBMDNkp0Ry/LI9cSC6/3GaibRWHJTVNq/7gO3BV9Xm4xZ5qBwX5k 7JSRu5frwBuzNHFX9OoPQSoZizAzQFAWdfEf50KJzB7tuKKZhMfxN4vSKaJfxmzSqYOo qRdw== 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=BfE+6jQ4B3f7iaxjBWQCWMkX30f+1h00o1fjlxq/Hao=; b=H2ASPX5y8a6nc2wPowhNzHe+NRYeysQ04c5Q7C6XD/D6UkfY08GdBAz4nZYKR/Kita 6UgEnKItFvn5I6TU3sgTNu+d1DVSvVbvj955L0YYqJy9sQw4ko2cBh61Sv5TQJ7GUADM dMCY7lSMQpINWAtjaJ3G92DleUGL5C+7FVMbiTBNhWWyI9cDjjMU/+5WmZs+TpesIQ/9 nSA/y7xMAjw+YN38DsHQWHYT03Rq8fPMCwZT7F4IuFQJCiuqReplwsNvSZQkUZewv2NF T7pz+uLkZUZX6MpDdmJnQdRv+LH0RTtLtouR42noyCqB1BZl4KP346vmUHQ8hHVO/U1R 6I/A== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Received: from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.9]) by gmr-mx.google.com with ESMTPS id j5-20020adfd205000000b002c685ef5fe8si395656wrh.5.2023.02.28.04.47.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Feb 2023 04:47:17 -0800 (PST) Received-SPF: neutral (google.com: 212.18.0.9 is neither permitted nor denied by domain of sbabic@denx.de) client-ip=212.18.0.9; Received: from frontend03.mail.m-online.net (unknown [192.168.6.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4PQxw51hXPz1r1Mk; Tue, 28 Feb 2023 13:47:17 +0100 (CET) Received: from localhost (dynscan3.mnet-online.de [192.168.6.84]) by mail.m-online.net (Postfix) with ESMTP id 4PQxw51Mwvz1qqlR; Tue, 28 Feb 2023 13:47:17 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan3.mail.m-online.net [192.168.6.84]) (amavisd-new, port 10024) with ESMTP id DMQhelXJhVBv; Tue, 28 Feb 2023 13:47:16 +0100 (CET) Received: from babic.homelinux.org (host-88-217-136-221.customer.m-online.net [88.217.136.221]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Tue, 28 Feb 2023 13:47:16 +0100 (CET) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id 2310645406F2; Tue, 28 Feb 2023 13:47:16 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([IPv6:::1]) by localhost (mail.babic.homelinux.org [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id WDY24E0QtuVz; Tue, 28 Feb 2023 13:47:12 +0100 (CET) Received: from paperino.fritz.box (paperino.fritz.box [192.168.178.48]) by babic.homelinux.org (Postfix) with ESMTP id 9B9BC454119C; Tue, 28 Feb 2023 13:47:12 +0100 (CET) From: Stefano Babic To: swupdate@googlegroups.com Cc: Stefano Babic Subject: [swupdate] [PATCH 2/4] Wrong count of total steps Date: Tue, 28 Feb 2023 13:47:07 +0100 Message-Id: <20230228124709.2629819-2-sbabic@denx.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230228124709.2629819-1-sbabic@denx.de> References: <20230228124709.2629819-1-sbabic@denx.de> MIME-Version: 1.0 X-Original-Sender: sbabic@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by 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: , The count for steps to be run is wrong. Each script runs twice, even if one run can be skipped if it is just a pre- or postinstall script. This increases the number of steps to be run. Note that partitions are already counted because they are just like artifact that must be installed first. Signed-off-by: Stefano Babic --- core/parser.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/core/parser.c b/core/parser.c index 4dec0a9..33d4f2d 100644 --- a/core/parser.c +++ b/core/parser.c @@ -249,7 +249,14 @@ int parse(struct swupdate_cfg *sw, const char *descfile) * Compute the total number of installer * to initialize the progress bar */ - swupdate_progress_init(count_elem_list(&sw->images) + count_elem_list(&sw->scripts)); + unsigned int totalsteps = count_elem_list(&sw->images) + + 2 * count_elem_list(&sw->scripts); + swupdate_progress_init(totalsteps); + + TRACE("Number of found artifacts: %d", count_elem_list(&sw->images)); + TRACE("Number of scripts: %d", count_elem_list(&sw->scripts)); + TRACE("Number of steps to be run: %d", totalsteps); + /* * Send the version string as first message to progress interface From patchwork Tue Feb 28 12:47:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 1749440 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::240; helo=mail-lj1-x240.google.com; envelope-from=swupdate+bncbcxploxj6ikrbv7p66pqmgqewrrn7wi@googlegroups.com; receiver=) Authentication-Results: legolas.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=Xjcyw7p8; dkim-atps=neutral Received: from mail-lj1-x240.google.com (mail-lj1-x240.google.com [IPv6:2a00:1450:4864:20::240]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PQxwF6RsTz245p for ; Tue, 28 Feb 2023 23:47:24 +1100 (AEDT) Received: by mail-lj1-x240.google.com with SMTP id 10-20020a05651c12ca00b0028fd85f2e0asf2751725lje.22 for ; Tue, 28 Feb 2023 04:47:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1677588440; cv=pass; d=google.com; s=arc-20160816; b=VLOPmLhDhWHQbgVPMcRPW6uO13WxSS+O2M6OKu5ox93l3fgsoQHsrqqRS87R3SaSiL xOO+/mQSAwKdyH/khXToiiQBZ19tGaTbigXrs2znvrRE+Kla3B0EUHzzvN/aN/JZUPVU NlsPR2ToKw85lxYMUJFk5mm4/x+RwLDkG7k/SthQCpESFaz7ZHDbwNvQks9OLMdy85BE aP5W+j09UnfLPCGqoWrolptX7HOgHCsL0QMqIrY8pCATxMt9XlZrxfhjTF54ektsVc7G q0N+Ku+1II4lHOKbFhw9YLUzHNjXVTpqio2meX9k3dOb4xFEuydwK8rpy2zSJIqKU6Cp /18Q== 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=kmlJhSlhkxigedPH4Mb+1v4W6hLvL+e7Yh+5KNjBzgE=; b=etk9k2dZUvGafD1IOj2e8+WXLgiMtPsz+ySkBraZ4qoouhjBF/zXf50OlzTBZ73CX7 sJHoqG7u4uxsILZ/yPYjMkZ4UMmgplTOjL6uPzL3IWOV3jQaMBX2vcoRxS4/YXqrJUYw 1PrQdmT9bJi2cq41tpM/GE3Y48wMn1HTQ19+ME5QaOZz4NNC1Gj+Vhhe4vfaAu8LCbYs A0rrLqe6u6Epyrv3aZIE57Lfg9NBOoqs/HOT8t3QhswBn040gXN3yPSApS1FmThd5RuY SZ6I22xvoecdbWQSFUBUbX9y9+wgWpUVslFmLOsCD9Z4In5k6/CSw71s6W/Be0IITLTX ItUQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; t=1677588440; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=kmlJhSlhkxigedPH4Mb+1v4W6hLvL+e7Yh+5KNjBzgE=; b=Xjcyw7p8epIlGtAEbDbfx36NFWOXQ4zSrAMdr6Mu4Hr6xkRqHmI34mxXhsRt/vy6UP p4oYKqw2FSO7XFOgutCJwhcnReoBKmb4B/tr6BeJXjQsqrZZLI0khn+0/jEbfHI1NHQV NDDYzzgWnHhXavlcD2dExGhZ5xMllrzfRXe4dy/2+2cku/7vLHNzoO7Sa01QSmxXoktZ mwLptH/FY7QUQDs3ePVK/r7m1mn9iktUTug4Smhei7yvCbStRmCIqXxmS3zlzpRNKhJc lgCX56oCGw2aN0zrlybjctJM0iDqzedEQ5eID7W27WLTUmNVr/ijkIy6KohRGcgc45Ld v3Zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677588440; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=kmlJhSlhkxigedPH4Mb+1v4W6hLvL+e7Yh+5KNjBzgE=; b=fmmWqdAto415F3TCQv03LsyGjHPTq4MRlON7lMRJT9P02YYkMVK3eQHMTB+HssMDKm dSsFgBjwXbX2EgrNfkdM7Sm7noUq7IGzVTf/u4lFQoUg7OkWtriv5Zd395og7iiqPn8M 33pSR9LNVvQbK8uXv/Kqj9uZvezJrex/D/RLkA5R+etkQeA81JqdOaJjWvF77VozO1w0 bMdNqu096pvbPFbnz/HKYSZdlQ6Rabv/YKqT5kA350XaofQgqTmXXbOhuDVoTEs/JZ3F GIleKopJvvYYTlUoqDuOqgluNtmPVXnripmAQN6kwngT5VGrmnJqULPl7eLe9vVIzTET GYOw== Sender: swupdate@googlegroups.com X-Gm-Message-State: AO0yUKVREky3p9JlwkHM+kEbpbtgh9o6tfkXQlqTXECur2JXy68WgFvY bps33NEYrXCj8pfm2s8gIaw= X-Google-Smtp-Source: AK7set/NwAqEjHr8+w0NvZ5Y4CGBMNWFZyFqTzXni31douGGUZ4SCkp3aYQKQrZB7gSeU3qRLhCbxA== X-Received: by 2002:a2e:a268:0:b0:295:b0cd:523 with SMTP id k8-20020a2ea268000000b00295b0cd0523mr760156ljm.6.1677588440417; Tue, 28 Feb 2023 04:47:20 -0800 (PST) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a05:651c:391:b0:295:b860:7804 with SMTP id e17-20020a05651c039100b00295b8607804ls1042314ljp.5.-pod-prod-gmail; Tue, 28 Feb 2023 04:47:18 -0800 (PST) X-Received: by 2002:a2e:bc0b:0:b0:295:ba22:360 with SMTP id b11-20020a2ebc0b000000b00295ba220360mr1229186ljf.42.1677588438757; Tue, 28 Feb 2023 04:47:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677588438; cv=none; d=google.com; s=arc-20160816; b=OggTq5O4Ff5DhHR7xXrfqxh6PjTccnyflFZNttJxkxxYEX9oCE+B2+CqIPMapBcBbQ fGYEZ2sSJWaE9R3VCaNSABakxGv+3zFfVe+9OAYjbxeuZPAeCh+BNcbpq2A6b73G0IqQ 0gY3rvhRXGBv3d6+zArOx2tcHguKJweEH6TbqFuScNmDxmn2GIiq84SNqDdHGBUMxuRa w5VAbk5OAPMACNUhN7ZdvUgSstMTLLsRZlbXd2yCKLLY+KZKPPStkL3dGeC20YxlQey3 0HSNOM3IeOK6JQ6vKcjkt2F9FUz/WS47KoSGlsd41i6g1UO6g1YwT6cmo6ABHrCaigDf VxAg== 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=MRlRNmK29E7Krxz2Io2uGVSIBlInXCXDp14bivr/+bM=; b=jAxIGCxm8GClazvhsWbhQ9UD3G5ddC/Gqr+9xhe0cAv6r8EO6laC3vyuP5wp3pvyRN sUbbisjZ1OB8Bie2u7GoxhKZJpOJdiOyTiwuFQCT8p/3eD6hq4zaNbPvCwgRmNw7FytU C8pNO0otqrkdStH72/wT/VQKUXdrh7csNfSTIJS+F0wM1VG5JL+hr9nIYRpziQ5XTx83 ugZKZ3JmYQoAw0f9MkyG94wvpHWHy1DrwLzSXuxc11Dai70Pzwv+bs1doNmsv6vDYQW3 DIOY3q3zw9/447YQ74dIFBivkhiIyXKMjYfuKVmx0BcSxn7NhQw26NG1IlmDxX2JpBaq /V1Q== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Received: from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.9]) by gmr-mx.google.com with ESMTPS id l6-20020a2ea306000000b00295a255ee26si369187lje.6.2023.02.28.04.47.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Feb 2023 04:47:18 -0800 (PST) Received-SPF: neutral (google.com: 212.18.0.9 is neither permitted nor denied by domain of sbabic@denx.de) client-ip=212.18.0.9; Received: from frontend03.mail.m-online.net (unknown [192.168.6.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4PQxw613myz1r1NF; Tue, 28 Feb 2023 13:47:18 +0100 (CET) Received: from localhost (dynscan3.mnet-online.de [192.168.6.84]) by mail.m-online.net (Postfix) with ESMTP id 4PQxw60yB9z1qqlR; Tue, 28 Feb 2023 13:47:18 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan3.mail.m-online.net [192.168.6.84]) (amavisd-new, port 10024) with ESMTP id 3q1qpAPqOCaZ; Tue, 28 Feb 2023 13:47:17 +0100 (CET) Received: from babic.homelinux.org (host-88-217-136-221.customer.m-online.net [88.217.136.221]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Tue, 28 Feb 2023 13:47:17 +0100 (CET) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id 505F745406F2; Tue, 28 Feb 2023 13:47:17 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([IPv6:::1]) by localhost (mail.babic.homelinux.org [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id 6QJ94rH9l_rh; Tue, 28 Feb 2023 13:47:14 +0100 (CET) Received: from paperino.fritz.box (paperino.fritz.box [192.168.178.48]) by babic.homelinux.org (Postfix) with ESMTP id B652445411B3; Tue, 28 Feb 2023 13:47:12 +0100 (CET) From: Stefano Babic To: swupdate@googlegroups.com Cc: Stefano Babic Subject: [swupdate] [PATCH 3/4] Scripts must send a progress event Date: Tue, 28 Feb 2023 13:47:08 +0100 Message-Id: <20230228124709.2629819-3-sbabic@denx.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230228124709.2629819-1-sbabic@denx.de> References: <20230228124709.2629819-1-sbabic@denx.de> MIME-Version: 1.0 X-Original-Sender: sbabic@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by 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: , 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 --- core/installer.c | 2 ++ 1 file changed, 2 insertions(+) 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; } From patchwork Tue Feb 28 12:47:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 1749439 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::33d; helo=mail-wm1-x33d.google.com; envelope-from=swupdate+bncbcxploxj6ikrbwhp66pqmgqepvutpqi@googlegroups.com; receiver=) Authentication-Results: legolas.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=XU/T4nev; dkim-atps=neutral Received: from mail-wm1-x33d.google.com (mail-wm1-x33d.google.com [IPv6:2a00:1450:4864:20::33d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PQxwF5Yt1z1yX2 for ; Tue, 28 Feb 2023 23:47:24 +1100 (AEDT) Received: by mail-wm1-x33d.google.com with SMTP id n27-20020a05600c3b9b00b003e9ca0f4677sf4199332wms.8 for ; Tue, 28 Feb 2023 04:47:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1677588441; cv=pass; d=google.com; s=arc-20160816; b=aV2T+PqsioIiSZoIqyvzCeHWw2lBi1LKTq2mbi1kGvR0lnAz2OhwUL4VKi3gINV3kA TPDfP5U7ansH+PsGAVG99r0CBQbMEfNyqqnkZ0+Inq6TBsWgm3iZjNQJoWF62hFelj+P aeREegpQMRiTtSG7SaghjSQHeeTDKNGcUfX5BKYmPz6Rn8ajmOWom3/fVr6fmTL+c8OD N5RIRNjPnh0CiQp2kS+knbpCEh60rAaRnMklFZY8i+ZWylTW2cbjjJC3o7wIpy6zbAFL fvIYKh+4k40bsq8z+I26tw4T9S+QislU9LCSkApnu+3RuuGmcEIcjcPYCiWEwL3r/riS nQFQ== 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=d8pHFQLtVt94tyiykBFiTKl+hF2jYzQd2GJvxx2kGQk=; b=aawsCOqdbcb2qKROhIoAERm6V0LMTHnn7zPfNXzXoiXj3dg/MARACNLtEIAshFyeSd 1e9x45I3rUrI9FbUtXZXtHxhurz4blUXhRXOVURSfq7wdoVQOeyaIwet2qWMHW9b0qwz aZiTiaHdPmS0Kza9bol7mY4LLbzhOmxk/cQk1Cq1SvLmXrgG7DxO8nTbdvurrldCTah7 JFjQywRFePNNcdLcr4c43g8q+wBMJlf62ctJZRNccxZdb0ffr/ld5+hM3w0jEQiR6M0O 1puCqQP9xL8lveIoD2ghesVIm2SGAWbjimbrqgmtgRJkPu1BiZkPySq8whxjDRekXux0 O5Lg== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; t=1677588441; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=d8pHFQLtVt94tyiykBFiTKl+hF2jYzQd2GJvxx2kGQk=; b=XU/T4nevcoGTJQ+KKlUkFFQTuepZhGukm7Shn7w1Y3niPNb6wAAg59FHiBcSn+yt8D u5Aufh04RFN7wG+usqeEhFP5qWYorDNsfOM2jcvSF2mSFlYHUajbafXTr2BPkmyvMM91 vJJAEWNEFTLisudCgfdPJapXvMoHb55SG2Cu0RrK9/S9ZwHl3uUiYBj9Y0hNFld5COg3 j6S8SR27DfWoOi0EhHP8/HAv386o99wY9wCzolT9fsx3VBy4fS7WFSDj5Gv0Yi7baiDW bAEI2NhEtqeyFZMc7CXdUoJPqpINS41+iFHjWBy7m4C8dHZjlwrIiq1JQK2FojhMuqYX FxxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677588441; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=d8pHFQLtVt94tyiykBFiTKl+hF2jYzQd2GJvxx2kGQk=; b=eX+YrMi9T76guQYCYbhDCK9Q5BYkKCj8WSPX5nOuJB9oCvTs0isFB7FWXYBE96ZFIE yzkNB/4hi9g+9W5ORvAX2gnCaOdN4aKSG5lkLqxXePZx7J0zD5REbfQBNE7LgMGEVWxA SiEPZRnKebFA/JRwl4ux53MJwTC1/JWqXak1Z0OFj/B0iA4Cdp3tJuoi4ME9Un8t6SvN Y9eqQbgmmsDkuhtqIxrrFet5t6t3H5csGqiS3VeLhq7yQiF9OOEX0K45s4io+LnZv9Nb GS5W6DjAa0o2/uHaHn2ztNkq56thdHL4o92s9aF7P/DUX+1NNnWsjTrz9OI2fy6lvFEQ Oq9A== Sender: swupdate@googlegroups.com X-Gm-Message-State: AO0yUKVW0mzKXN+lkz39LaoP6kA1wd9KurYNNciKIoQvyvoyyppgVRb1 0OA5U657dsrLxvGTJeFkNHg= X-Google-Smtp-Source: AK7set/Kv2FQMol0htk8+eSwhz/wcFV0yucVRdeWqJEd3XmUUJiGdiN5eOaZkS45xTOPZCWY9kEddA== X-Received: by 2002:a5d:5089:0:b0:2c9:59c3:1f52 with SMTP id a9-20020a5d5089000000b002c959c31f52mr481581wrt.0.1677588441174; Tue, 28 Feb 2023 04:47:21 -0800 (PST) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a7b:c4d9:0:b0:3cf:9be3:73dd with SMTP id g25-20020a7bc4d9000000b003cf9be373ddls9029089wmk.3.-pod-canary-gmail; Tue, 28 Feb 2023 04:47:19 -0800 (PST) X-Received: by 2002:a05:600c:4a9f:b0:3e2:9b4:4303 with SMTP id b31-20020a05600c4a9f00b003e209b44303mr2050288wmp.19.1677588439759; Tue, 28 Feb 2023 04:47:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677588439; cv=none; d=google.com; s=arc-20160816; b=FRQrr0yxIp4b6V6lLzSvdaAkwZ0pW38sv8YSxn3HRVbXj7CUlOFOu9H0pzKPXf1xkT lZjTpGILP0EigqvALT3lSjn6bp1NfQSJDbm3eWj8v21sa2imRyK3pj5hTop8yHbT6VFL YQRbrHMrF34WBK5NQtng+bPespD41UNvqscsbT4XKA6gKnaknZ4R80JFnPBbrLWUBxu2 HT7yCTP0Fh6avwED5rD62f7+fyvVxx7QKj7mX0gkSke3I2DFmZfaiLd64L4GZ2HD3QZa BrpE7oKVbnUcTYk+Cile9hmJXkhgwOyAD5dPhwJv78ZE5Y+5o+KA4/PDYMAU6F6PyJ/X pJHQ== 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=dPCvQaHWmGNy9qiuYbHJGbWrIgVCEhW7QsgGa2QZpEY=; b=V59t0M+dlsvjjEiqgCLGnL+Tqcxf8LbKgMLrrfl2fAYj9aeYDDHvYGS/DbW/h1YOoa cTo8YX2NewPxPrjhIxdy4pIeOaUxu1nvbPrzzO1ojONUBE+EvId0h1JKhrnAwS7GpKcR 5vb15VdacIl/O/mjvn6lftkHZcSr+kmGdZ6RGTJu6HXjKPTVPtTBoJMB5EsjvmSE9Xua ceGwEDQyKGkJDMwCc1lcGDw5eT08HDXvgxVAvtXZk8FJ3qh5g/SQyOzE7vs6eDsP+UCx V8qV1pMLOLIypjA2fEqrvxxT/pxJyhpogMeu7gGChoO3KOOi1W1NUo8mGnOd+obb8K+u xLJQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Received: from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.10]) by gmr-mx.google.com with ESMTPS id j5-20020adfd205000000b002c685ef5fe8si395660wrh.5.2023.02.28.04.47.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Feb 2023 04:47:19 -0800 (PST) Received-SPF: neutral (google.com: 212.18.0.10 is neither permitted nor denied by domain of sbabic@denx.de) client-ip=212.18.0.10; Received: from frontend03.mail.m-online.net (unknown [192.168.6.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4PQxw73mfgz1sB8D; Tue, 28 Feb 2023 13:47:19 +0100 (CET) Received: from localhost (dynscan3.mnet-online.de [192.168.6.84]) by mail.m-online.net (Postfix) with ESMTP id 4PQxw73YL6z1qqlR; Tue, 28 Feb 2023 13:47:19 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan3.mail.m-online.net [192.168.6.84]) (amavisd-new, port 10024) with ESMTP id R-XUgpPLQXV1; Tue, 28 Feb 2023 13:47:18 +0100 (CET) Received: from babic.homelinux.org (host-88-217-136-221.customer.m-online.net [88.217.136.221]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Tue, 28 Feb 2023 13:47:18 +0100 (CET) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id 93C7E45406F2; Tue, 28 Feb 2023 13:47:18 +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 9p2mMCjgdt7t; Tue, 28 Feb 2023 13:47:16 +0100 (CET) Received: from paperino.fritz.box (paperino.fritz.box [192.168.178.48]) by babic.homelinux.org (Postfix) with ESMTP id C80694541219; Tue, 28 Feb 2023 13:47:12 +0100 (CET) From: Stefano Babic To: swupdate@googlegroups.com Cc: Stefano Babic Subject: [swupdate] [PATCH 4/4] Partitioning handlers: signal when they have completed Date: Tue, 28 Feb 2023 13:47:09 +0100 Message-Id: <20230228124709.2629819-4-sbabic@denx.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230228124709.2629819-1-sbabic@denx.de> References: <20230228124709.2629819-1-sbabic@denx.de> MIME-Version: 1.0 X-Original-Sender: sbabic@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 is neither permitted nor denied by 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: , Handlers must signal the core when they have finished or which percent was already completed. This allows to maintain the progress interface in sync and to show the correct step during the update. Signed-off-by: Stefano Babic --- handlers/diskformat_handler.c | 7 +++++++ handlers/diskpart_handler.c | 26 ++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/handlers/diskformat_handler.c b/handlers/diskformat_handler.c index bf236b2..d4c4520 100644 --- a/handlers/diskformat_handler.c +++ b/handlers/diskformat_handler.c @@ -11,6 +11,7 @@ #include #include #include +#include "progress.h" void diskformat_handler(void); @@ -51,6 +52,12 @@ static int diskformat(struct img_type *img, /* File system does not exist, create new file system */ ret = diskformat_mkfs(img->device, fstype); + + /* + * Declare that handler has finished + */ + swupdate_progress_update(100); + return ret; } diff --git a/handlers/diskpart_handler.c b/handlers/diskpart_handler.c index e4da184..316db56 100644 --- a/handlers/diskpart_handler.c +++ b/handlers/diskpart_handler.c @@ -25,6 +25,7 @@ #include "swupdate.h" #include "handler.h" #include "util.h" +#include "progress.h" void diskpart_handler(void); void diskpart_toggle_boot(void); @@ -1140,6 +1141,11 @@ handler_release: if (createtable) free(createtable); + /* + * Declare that handler has finished + */ + swupdate_progress_update(100); + return ret; } @@ -1444,6 +1450,11 @@ handler_release: if (createtable) free(createtable); + /* + * Declare that handler has finished + */ + swupdate_progress_update(100); + return ret; } @@ -1542,6 +1553,11 @@ toggle_boot_exit: if (cxt) diskpart_unref_context(cxt); + /* + * Declare that handler has finished + */ + swupdate_progress_update(100); + return ret; } @@ -1668,6 +1684,11 @@ static int gpt_swap_partition(struct img_type *img, void *data) goto handler_exit; } + /* + * Declare that handler has finished + */ + swupdate_progress_update(100); + handler_exit: if (tb) diskpart_unref_table(tb); @@ -1688,6 +1709,11 @@ handler_release: */ diskpart_reread_partition(img->device); + /* + * Declare that handler has finished + */ + swupdate_progress_update(100); + return ret; }