From patchwork Fri Oct 30 12:05:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 1390989 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::33c; helo=mail-wm1-x33c.google.com; envelope-from=swupdate+bncbcxploxj6ikrbced6d6akgqe6nz6xzi@googlegroups.com; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de 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=SVCYbjUg; dkim-atps=neutral Received: from mail-wm1-x33c.google.com (mail-wm1-x33c.google.com [IPv6:2a00:1450:4864:20::33c]) (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 4CN1Gm19Tjz9sRK for ; Fri, 30 Oct 2020 23:05:33 +1100 (AEDT) Received: by mail-wm1-x33c.google.com with SMTP id 22sf1167919wmo.3 for ; Fri, 30 Oct 2020 05:05:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1604059529; cv=pass; d=google.com; s=arc-20160816; b=GM0rtx70N5ThOZsTT3+KcH3u7461aDb82uHrkVh+9eD1AMPGmImYNBF/7VB0MB4hXM QSIAH8V56SGHAt9MH0Z+cMjSQIChRCbJP/5bXirFSCA706+Ysx3+jXnrZGdL7TyDZVnp +WQZw+sJS8rzlsnyy0xOzTHaSM65p22s7eUmOaRcGp9dYwaiAfXSlZujFuFUj36QE30n ZDBLKfu7+NjGgzJJC9szgX7M0IKCC11r2ZPhBYMtEmSstlVbBed1tvmdJxVTRXiAk6J/ w/65WOM26jZogafjXntQc/dNAC4PxfEkYsepYu9DZ+xw8Xob7E/bhCe3RBetPXcdxTl2 dwUA== 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=Gi+Rj6Jk+dGpca2K9eUFtI7rO8s0V3aTXlxbsQDEmYc=; b=BjiFe8wc+3ZYgIDpBE8ZF1AN8v5n/AvU3k2v0JqgMGWhRhKj8uIgB91lWO2104unE+ 4PdFdQRep79hT6Brwjh3Ysl7tPnHdE4/OetSkuiO/4hj32LRPyCu5EBu2piGpieozt/q NWmABmTKJD8FY7unLjAvo43h7fT6cHFY6xqS/FJmDY8VASdMT4isRWA4f6wV6CsrksFy 3k4HvtZl/iTUpnWXgqlZD5Kkxjs87uaCwNxjdsYFm2DRHPAh4sWJM4CM6FqkGMYCaMZO WfzpNKk5IyBooYr/bLRgaOO62iF2aAnOfVEXK0YAP/glzgWGuV+4d1R91SuJQqNbNLl2 5XXw== 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=Gi+Rj6Jk+dGpca2K9eUFtI7rO8s0V3aTXlxbsQDEmYc=; b=SVCYbjUgMaCdH75UYJx4j1Q/lTy4jlRzZgDHNEF26e9++JMVc9eRdqryeEboKK5do4 sYOpkdK9qj5Qd54wx0mtgt18TsjLb+FTZJrUZxH5TIWEeS9/izm0ha9GSRixrmE++agK luMWb4TLRa8IsaxaLR9aZ9J4/311EOF9poxnuUCGFe9klXnkzJw70Ubg6Hxv3Vezh5dY CBH3TC3Tb7YzqA9vfspO21JzpbUDBNz0AMHB3/onBHPLG22odd+MvdBWGcrNp2vtF2zW VOEZ698UqXKuEOBEiyqARfMTCjzW+mbZbyu9BHsLW4dlNZ+DPolmCgykjMWL9q3Zo9PI OXpA== 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=Gi+Rj6Jk+dGpca2K9eUFtI7rO8s0V3aTXlxbsQDEmYc=; b=Blw40L/Q34aYiDFj8P/CQqBJs998/kxd23kcWcHs+inVq2MrsD/9iQiExi2/pW1E0j etHisTqnoUdOj/sqTiqQvNjm3Kx6tMcVocZa/geVFziF5XxAT8nYMt1BdGLZ1hzEAVs3 r/31PJRbbdkOnM4/lHUcZY2k0dYCY3Wb9+x+0vryitxsYS0qYuCAmOWNU2jfWzgkJ1pi e11HP0QYDVGKKAiHXpEVJwVPYnnxPD4NhR2IKRr2UhrWIIvLPw5e2GYWImBq2gmuaADw riXmwqF2Glvp2MGcKxPwxU0iPG7wgM8+3JCjhU+fX2SbHHhYcyOX51m09dN/BspHRTv0 jO+A== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM533kCzlKoM79mAzOrcXZz3tPWvXntscgwneO9YPJ8ph+B0kFr34D dUA/4iOoWvkvdPY31fnu0EI= X-Google-Smtp-Source: ABdhPJyOOwNEjFwPnkdAXrKyRj2+qhawLqZWm2cCHRwSUjnnKPtKhdjJG4oTA7Pz2yrTbsiCBn3LVw== X-Received: by 2002:adf:b190:: with SMTP id q16mr2841248wra.288.1604059529060; Fri, 30 Oct 2020 05:05:29 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:adf:cd8c:: with SMTP id q12ls1404312wrj.0.gmail; Fri, 30 Oct 2020 05:05:28 -0700 (PDT) X-Received: by 2002:adf:ef45:: with SMTP id c5mr2892788wrp.117.1604059528049; Fri, 30 Oct 2020 05:05:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604059528; cv=none; d=google.com; s=arc-20160816; b=0dZxskbmAaICYiG65eWbVlMrFVm9Jru4aI4tCnugpZjNNTQwFQoV1xN+xNxEkrhdwg dGyx+LV2PuSfaLDBU+/GLwGpbtyS1mnp2qT3qpNzKhV2f2IgeWpalGJuIw0ZzvZ5e2bl e8SdgAjyitIFlspZV0IlGYPUnTGW9FHccrhvgTu7g3atCUSxKNDkxFI/xeAC6coQZ5lY bCUoyKh+dnWcQrzS+iAn711ni7GBqtP+dajMFJruarcwi0xkG1WRAFUwqluOSKkn85ha Sv8xCCeqAbRifiKADi2GjeAChcJExBzbW6B3u+Duw32QSsKwPP6nZyMksfGa8GyrtSIp u/Ow== 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=PYw56Dbfh4GiVeZwSUTuGo1ijBlZEzeuS8bS//KoWw0=; b=u02A/6ujTslq+WLawkvsFV/FUW0PKE96sKhBMNpylAxL5mgEcsCSzHBUqdnLcX2wJl 5gbyG7zZ8bordiTmDTzp9/xwsrFVf1qQzsZYeZIqjMsoMNwNOsWuTryJXSJpOu36nxqU iG4pGdycmujuP9nlVs3Y4/C6UJyeJDbgcDhHh3bjuDdJtANGQnb/o+HwTPuwLMyD8D+R pX2IOcDOxYnyWF0SJs3nZqU5xvoncQ0Wa1DT0Quxnm0x/9XVqRIWcxhoezyR8liwaj4/ zCTR2thwOmYioQmfl3kebQyGX9Kts0Jvnq4SU8wlfFWHT2ASHGEhgW9VYWtiwOR0wfNF dadQ== 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 f131si64978wme.1.2020.10.30.05.05.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Oct 2020 05:05:27 -0700 (PDT) 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 4CN1Gb5vSPz1rxwf; Fri, 30 Oct 2020 13:05:27 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4CN1Gb5bmvz1qtrs; Fri, 30 Oct 2020 13:05:27 +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 NBS1IhAGLZSJ; Fri, 30 Oct 2020 13:05:27 +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; Fri, 30 Oct 2020 13:05:27 +0100 (CET) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id 5DF9D4540700; Fri, 30 Oct 2020 13:05:26 +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 zeo4GsI1wcCn; Fri, 30 Oct 2020 13:05:23 +0100 (CET) Received: from paperino.arri.de (paperino.fritz.box [192.168.178.64]) by babic.homelinux.org (Postfix) with ESMTP id A87E845402B2; Fri, 30 Oct 2020 13:05:23 +0100 (CET) From: Stefano Babic To: swupdate@googlegroups.com Cc: Stefano Babic Subject: [swupdate] [PATCH] Drop total bytes to be downloaded from progress Date: Fri, 30 Oct 2020 13:05:20 +0100 Message-Id: <20201030120520.2905668-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: , Commit 029738e introduces a change of API adding the total number of bytes to be downloaded. This breaks current API and it is temporary remove with this patch until a suitable way to forward API changes will be implemented. Signed-off-by: Stefano Babic --- core/progress_thread.c | 7 +++++-- include/progress_ipc.h | 1 - 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/core/progress_thread.c b/core/progress_thread.c index a216eaa..cc556c1 100644 --- a/core/progress_thread.c +++ b/core/progress_thread.c @@ -89,11 +89,15 @@ static void send_progress_msg(void) static void _swupdate_download_update(unsigned int perc, unsigned long long totalbytes) { + /* + * TODO: totalbytes should be forwarded correctly + * after adding it to the progress message + */ struct swupdate_progress *pprog = &progress; pthread_mutex_lock(&pprog->lock); if (perc != pprog->msg.dwl_percent) { pprog->msg.dwl_percent = perc; - pprog->msg.dwl_bytes = totalbytes; + totalbytes = totalbytes; send_progress_msg(); } pthread_mutex_unlock(&pprog->lock); @@ -136,7 +140,6 @@ void swupdate_download_update(unsigned int perc, unsigned long long totalbytes) if (pid == getpid()) { struct progress_dwl_data *pdwl = (struct progress_dwl_data *)info; pdwl->dwl_percent = perc; - pdwl->dwl_bytes = totalbytes; notify(PROGRESS, RECOVERY_DWL, TRACELEVEL, info); return; } diff --git a/include/progress_ipc.h b/include/progress_ipc.h index deba39e..f508eda 100644 --- a/include/progress_ipc.h +++ b/include/progress_ipc.h @@ -27,7 +27,6 @@ struct progress_msg { unsigned int magic; /* Magic Number */ RECOVERY_STATUS status; /* Update Status (Running, Failure) */ unsigned int dwl_percent; /* % downloaded data */ - unsigned long long dwl_bytes; /* total of bytes to be downloaded */ unsigned int nsteps; /* No. total of steps */ unsigned int cur_step; /* Current step index */ unsigned int cur_percent; /* % in current step */