Message ID | 20211114172733.71602-7-sbabic@denx.de |
---|---|
State | Changes Requested |
Headers | show
Return-Path: <swupdate+bncBCXPLOXJ6IKRBH4OYWGAMGQE2ABJN4I@googlegroups.com> 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=Rin0qx0R; dkim-atps=neutral Authentication-Results: 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+bncbcxploxj6ikrbh4oywgamgqe2abjn4i@googlegroups.com; receiver=<UNKNOWN>) 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 RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HsfRR3nxXz9sWJ for <incoming@patchwork.ozlabs.org>; Mon, 15 Nov 2021 04:28:03 +1100 (AEDT) Received: by mail-wm1-x33d.google.com with SMTP id c1-20020a05600c0ac100b00322fcaa2bc7sf6916362wmr.4 for <incoming@patchwork.ozlabs.org>; Sun, 14 Nov 2021 09:28:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1636910879; cv=pass; d=google.com; s=arc-20160816; b=t1b4wQeYpGcL1Q4plUVZHMdN5fKfCVvGg/zS9+5SVDDsaNr2KRY933TYNwinBr9UaB 5VhqjlEWeifNRo17cW55MFWja0zDAkDVBuqAe5CXejBJVwO7RMkfXtdj4Yt0krf2kjPa fgzDw/lmHwQqGtcH6+UKqEfybXNoZBESV7jAqVOe3e5rTPU42iE9jVZZe9ag4yUSgg9R +zQUvZXHZlIIlH5RxNkUxIEwM0JxP/VYZiQwF6LKdsJEi/B9fiE/XKfZJqHUYOngdYp1 g2jQ8at+RB5RetUbyzVoEffHNUT2bfgDQXl6en2dMA3ovkDRVp7cr/0QQlDelosJVTax WHwg== 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=PG4F20IV+W7NCyvqP3YBj3KJCLL5L/ui8BA7k+QASvw=; b=YOvLeT3fU/MkxemEVSrPmyQa/jfiCRcswZy2+hpFmuFmcvgr7Y/baLWRQXwasJQwmL dC8KonVHKnU6/NpXU4pO7A6UZR1VwQGlalY8l/IZ36O+4W0NvfAVZMxaL3X2keG01N38 g5B462HcORx4F1da1qoBpNtAilxhZG+2MypSmKgEXXMl0iwAnEKtMrVt6GkV+lIKxBL3 uYc1yDYZ5v68TMc591exAgmVrKP2Iz6VQnky3Jv+jE7v+TZ51n5yeweP3838ph9fOims vVjeqLAp2gtblCBw4g4iNzG5BA1jxmASe6pyx4uAfjE90ptfpAz4EhJhtFMbOWUhrnrI wZbQ== 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; 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=PG4F20IV+W7NCyvqP3YBj3KJCLL5L/ui8BA7k+QASvw=; b=Rin0qx0ReryegD0Wd4UgF5+6GsChekefHMVMr/Z3w2tvfsFlUIiVyiOHAo/XU72Nzz J5aEzHCeN5CD5UmmeNakndKiZ2sj2PJmxM/GzEF6aQ4WHF/bDtFW2FDV6CbaTuleEMYu enqYlw9U9H0G5MDTWStAzPVBT3S7qzi3vUUhPDk4X8DjkQvW3YXJ3F6xw6Fh1hBVg1e+ B7VgA1iE5wKof+vBLRxRtj3bSqb2qzjm42KxGvHPBTO+Bkw0zibbXx7TMbOvC4J85sDT /c/tj5mPaAF+O8PJlGIPAQyLmyKFQ0Xnor7xAtmQ/saA7z1KEvNKt2gHuidwXSMBZ7ku pY3w== 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=PG4F20IV+W7NCyvqP3YBj3KJCLL5L/ui8BA7k+QASvw=; b=Rw4qoAZTt/c44w7GMxZUkakk8PKiF2y676wr5aTMZT3cI3efeK/KuYi3PfdHjwYvCx fgpdEO6ZHYXRtw6TmyehSlLc2z9XJSQQMvkFLyR5LL2xTtyz93ls0RpOaYTfq0s4c3bJ j16+nyfJUent/KxR7tssX7KmAoRZofqD7o5GyQkxKerM7x9nAwmernicsYau31Ov0cVE hZHibLKMzgE0IFDgrxwepOi6FHZgyCrG4XiaXoxzALbOukOEEPq2ezs01gk9vagdKwnT cYOgJRNqrv6FQ5wFhCiwpoH1mVtbxaKDkB5Ll3XJMD6Rn5L5jvfZvgWWc27nahbeX1Bp pPcg== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM533ZZ44EVaOUnFd8Dbz1XtNPt9Mj+KdF9fQcsrS9pDAeUV/N3WBJ I/WtSoE93lK6/a42niCmxbA= X-Google-Smtp-Source: ABdhPJyW5E/namVjNbtN9EZSZVnF13Zy0SBRpNT+K74M/UJGx/uJlWWmXK6LHkFXCjQ1BCI/NNfGxw== X-Received: by 2002:a5d:6501:: with SMTP id x1mr39101133wru.390.1636910879794; Sun, 14 Nov 2021 09:27:59 -0800 (PST) X-BeenThere: swupdate@googlegroups.com Received: by 2002:adf:f1c2:: with SMTP id z2ls7196811wro.2.gmail; Sun, 14 Nov 2021 09:27:59 -0800 (PST) X-Received: by 2002:a5d:624f:: with SMTP id m15mr27465567wrv.13.1636910879039; Sun, 14 Nov 2021 09:27:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636910879; cv=none; d=google.com; s=arc-20160816; b=iWyAy+aWfdZ+1zcFWIEh36njPa59U6zKzYawQW1MMQQk9Pk+ph5l7/5Mc72hwCr0DT jp/fsvK2JEB77mBiuxLUuuGaQHQoHhnPmS7s9pUYP4QqMiluKy7r5eFJbDhSI4J/Hv+g YExxSBVSc6bIDJxGar+KvjvbxTnHfUYKsk1uCZU43dpIRo2hxPjVvosaq9qmsgVpeOsq b0hgPNCmwguLBWZzTPESNW/AtlnLFmRmFp3YMaQZ5M1qPh+w3wXXQGbJQGlqjdEw7MSS A1zz7iaPiqIMIRhk9lqrGPYqhy/R9TPJCiK6xapDp/UU091DxoR7wiVgsaGCXMWqtYDU P+Nw== 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=HNcVgtBxrajDZ63HySGxgvJzOfRrd+o/2gampVos5U8=; b=CRillieQPsjlhgM/xRa3x8kpoLXrZXzU6rFn9xIVnn96ieRHjC+co4VSBo5QbGMTSl k8G3rHl1TaOpFuvPMri0U6bmPi0yBppcaHyPlDTlDHZwzdNZpwrxhAqiJsUSo4eV1fWt pnXrM75emksJaKpcthi6ofw8elD3ek4Fk/tH4k0kMsPhaMY0+/C2X6TfmysNv3qs5gi5 EIcrrD1o62Sg/QdyyWGfwnjHtDPAsyJGUwEvTATppbXvWW6+9QVoBCq4otGsY7nrlHgV Od7eLOdFvFdMd2BTc89KEfKSJGW6+kFfhHT1nB9GyBB99lMKx3NtrEU+Kb2fhiRrB34g CDkQ== 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 g130si1274469wmg.0.2021.11.14.09.27.59 for <swupdate@googlegroups.com> (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 Nov 2021 09:27:59 -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 frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4HsfRL6HgQz1rk5m; Sun, 14 Nov 2021 18:27:58 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4HsfRL68y9z1qqkB; Sun, 14 Nov 2021 18:27:58 +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 LzZ2Zmp09MJc; Sun, 14 Nov 2021 18:27:58 +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; Sun, 14 Nov 2021 18:27:58 +0100 (CET) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id E455A4540853; Sun, 14 Nov 2021 18:27:57 +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 1sunqUs1nrcI; Sun, 14 Nov 2021 18:27:54 +0100 (CET) Received: from paperino.fritz.box (paperino.fritz.box [192.168.178.48]) by babic.homelinux.org (Postfix) with ESMTP id 2918E4542618; Sun, 14 Nov 2021 18:27:45 +0100 (CET) From: Stefano Babic <sbabic@denx.de> To: swupdate@googlegroups.com Cc: Stefano Babic <sbabic@denx.de> Subject: [swupdate] [PATCH V2 06/36] Hide copyfile() implementation to add more input Date: Sun, 14 Nov 2021 18:27:03 +0100 Message-Id: <20211114172733.71602-7-sbabic@denx.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211114172733.71602-1-sbabic@denx.de> References: <20211114172733.71602-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 Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: <swupdate.googlegroups.com> X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: <https://groups.google.com/group/swupdate/post>, <mailto:swupdate@googlegroups.com> List-Help: <https://groups.google.com/support/>, <mailto:swupdate+help@googlegroups.com> List-Archive: <https://groups.google.com/group/swupdate List-Subscribe: <https://groups.google.com/group/swupdate/subscribe>, <mailto:swupdate+subscribe@googlegroups.com> List-Unsubscribe: <mailto:googlegroups-manage+605343134186+unsubscribe@googlegroups.com>, <https://groups.google.com/group/swupdate/subscribe> |
Series |
DELTA Update
|
expand
|
diff --git a/core/cpio_utils.c b/core/cpio_utils.c index 2e4aca3..e06bf5f 100644 --- a/core/cpio_utils.c +++ b/core/cpio_utils.c @@ -380,7 +380,7 @@ static int zstd_step(void* state, void* buffer, size_t size) #endif -int copyfile(int fdin, void *out, unsigned int nbytes, unsigned long *offs, unsigned long long seek, +static int __swupdate_copy(int fdin, void *out, unsigned int nbytes, unsigned long *offs, unsigned long long seek, int skip_file, int __attribute__ ((__unused__)) compressed, uint32_t *checksum, unsigned char *hash, bool encrypted, const char *imgivt, writeimage callback) { @@ -633,6 +633,24 @@ copyfile_exit: return ret; } +int copyfile(int fdin, void *out, unsigned int nbytes, unsigned long *offs, unsigned long long seek, + int skip_file, int __attribute__ ((__unused__)) compressed, + uint32_t *checksum, unsigned char *hash, bool encrypted, const char *imgivt, writeimage callback) +{ + return __swupdate_copy(fdin, + out, + nbytes, + offs, + seek, + skip_file, + compressed, + checksum, + hash, + encrypted, + imgivt, + callback); +} + int copyimage(void *out, struct img_type *img, writeimage callback) { return copyfile(img->fdin,
Add copyfile implementation with a wrapper function to allow to change internals without modifying the API. Signed-off-by: Stefano Babic <sbabic@denx.de> --- core/cpio_utils.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-)