From patchwork Wed Jan 3 10:05:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 854929 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:400c:c0c::23a; helo=mail-wr0-x23a.google.com; envelope-from=swupdate+bncbcxploxj6ikrb6wvwljakgqe2yrnryy@googlegroups.com; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.b="G+An/o0X"; dkim-atps=neutral Received: from mail-wr0-x23a.google.com (mail-wr0-x23a.google.com [IPv6:2a00:1450:400c:c0c::23a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zBRQQ1yxHz9s75 for ; Wed, 3 Jan 2018 21:05:49 +1100 (AEDT) Received: by mail-wr0-x23a.google.com with SMTP id p8sf567923wrh.17 for ; Wed, 03 Jan 2018 02:05:49 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1514973946; cv=pass; d=google.com; s=arc-20160816; b=FJ+IWZNxj6R2hq+LqH2rHz6fHlFMSlA/2RwN54UVXUDDx3oshR5Ly5vKErimtImLIq dlWs+9aZ6IAHZ+dVIPMbzEozCqZyShE8QN0GZCiWuCsOcgkp6fZaEg1fJngmUxoxIiFu KbToRnCD/kfAelbXVTSy63fcmaXZHZ6WxazDwR3/m7EOrTCny6QAKbDlMHtfBLWE5XMe nl+sdWBdD0fmIIb28f2/QtRyad4QEtwdR4fj3Y2ztd2OkHjDwOMsk2EvRcjuKF0dDRh2 iWEeKRlrh42Pfd+E/GtPB8VEVhJW/tIOKhgb/VvLoZLBAA7HpnGGZJ/x44OxPLyEyQx3 k5Sg== 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:message-id:date:subject:cc:to:from :arc-authentication-results:arc-message-signature:mime-version :sender:dkim-signature:arc-authentication-results; bh=hztvRMsLSpWTc/elqHiQLTCR87zuPqtMpSChDPqM5BU=; b=WKIpVPCbo+MiGNwPAi1vZE+7gDdR8isOZ9ULMgkF/M2d597mkGQXNgbOARFXYvMFVa cTRh6LibL0izjOyalbHiNMDL/PvcaUg8vlnes1suEEwdF4eM54Qt9L4N2Ch6nzLJ8muK mvSIyFJgYo89A/EMZTUykFun/uhkqm2jK3opieMQs+JQjAxegqFOOWdgP5W8B1XhXWRE FibOQU6ytxTLmpqQ+xLW9cFFY+IvoJb8tFbPU0Pixx5WyfO4cGda7gRqIGETbBwI3+e2 XMQU4MwY3Wa47sDngH45OIRudCeKZV7xso9eKgxyQV0kaprpE7bCleZ7UKAFn2whgfdc SLKQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 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:mime-version:from:to:cc:subject:date:message-id :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=hztvRMsLSpWTc/elqHiQLTCR87zuPqtMpSChDPqM5BU=; b=G+An/o0Xr7IYhfj+W0+pUnae3bL4IWS9Za0CqIw5JupsJux/XlrLznG4MP90rWhSkZ PjaqozMzrxA9jZ0vAAH5H6nWdM2aXtDROJndBu5yqRx3sgPpyeMoVnPPtMPZa1r4QO/9 otga+t0JF0hI+vhAwBWIp/Vy9fzdSz6XK7vNTTKJ3Jtf0HhsxapNlzrCNWF3eMH+ziNH NQkm1KPMJoL0XrGdlztgStVAEwKma7vGvl5GAmJ2mhV988/bfViNP1fS2IJts3MyVpKq lBjiLFdkRHv0hoOtg5Yh39TyhPt4vTdvJUWwsuQcLYCObX6LlZS5LpZhepoDG5TRUXFD N3mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:mime-version:from:to:cc:subject:date :message-id: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=hztvRMsLSpWTc/elqHiQLTCR87zuPqtMpSChDPqM5BU=; b=HxuXvuM3J/nBOrA8E+l8efkwywhyCCEbHh7paJJY7eL9O9O9k6wvDqd9sxle7Cvo3l aziMGrP/W7BN1g5IaHy63KMG++ER8qsrJrxjZgDB2P4zoX0jxWTr45anGxaUrg4AP14w 70ojtKx6/sF/+pJFYIACPBo9luMpTHCjVrPeslfmH3bXjk5XzP1OtWBa8oBSAliO3mLo MSShYqOjx5KBhqQfTs5JGVLIFNmntI67gqqlfSq6wETuBWSxSOXCqry+fHhImWVdiCWi mUmdTaxVYgXuNIVHGGESz/F3y3IuImnHZG+MTAp3IFAAx22ZayJ0xP1b1ybRKOWM2ctg dfsA== Sender: swupdate@googlegroups.com X-Gm-Message-State: AKGB3mJxJmVKzk+CYsPcm0phlWVlLS5GLbu1h5y+6pHgeti5c1tDPGFZ cSRACCYWjjj6Qc0Ie8W50W4= X-Google-Smtp-Source: ACJfBos66BFnjxizB0DC0a7eQPYqZBkArqevLa1KXcX7aLI6qbiRpzhvN9n9tfxfr+tqAaq5RJ2ixA== X-Received: by 10.28.122.1 with SMTP id v1mr10009wmc.3.1514973946262; Wed, 03 Jan 2018 02:05:46 -0800 (PST) MIME-Version: 1.0 X-BeenThere: swupdate@googlegroups.com Received: by 10.223.135.50 with SMTP id a47ls5099115wra.14.gmail; Wed, 03 Jan 2018 02:05:45 -0800 (PST) X-Received: by 10.28.209.72 with SMTP id i69mr117746wmg.10.1514973945801; Wed, 03 Jan 2018 02:05:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1514973945; cv=none; d=google.com; s=arc-20160816; b=MzONYXg3Wh0lBiEi0y2+u/VicfxkB7P8ZnoMuZ1PS0p3d1XW0iKdr4AyM8cZO0f5yw GtNJoclS0OWN8qir8wM6Dd3CaonbeT2wkd61sv8hn39dM/besS7tA87WjT4+5WaERLcL mLFB5tR3UKw3GmZI5HZrjkK0EukEF1JfvzMtKxOjr9945nL0+APyUQodDrVJwNMpHG6f VMaMa+UUo3F7vGVGovgSvuVHRRQO0HQxO3ygNrNuNhJRDrlWuO+hiuKunvxJcZKmxJ9N 4+Gw2ILr0rTVaWs0bIiczKr39q4cHhLdquO7ohgrHH72VfKusimWL0igwxwqsfKj8dz0 4d6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:arc-authentication-results; bh=B6e+y0kEKAyoqK/zkkSq/yvGJ/MugkwS3j32M6D9xhA=; b=VZ8u6EsrPumKBZbm5zjwFZTfPzCpm8nu7fP8avZQHTgon0wDA/5IISqnDKvGyqxXkR gGgnyDX5byztgx46wJLouj4dr0WzxZnPJFDMDKyw9s7/nQb1+BUKwtqKRtrD9AOOC33x GiYdsHLb7skEuLY7sg19Zi80w3oVQWG2DWWH4Rx4gx1lLKjrtQ6pQxckKig6tDK3IDKZ CDEMBci75Tv2eK6GbGqgvo9gjvhd704eCgv/1/Bb6EOpWjkG/cIpJkgFuWLfiMB1Ec4Y dAV4ovaWh2OJpCi5q46f56X0tt7FVkG9uqt2Ty+2yfyQE9159F7t+bkoHBDN6GgdknuL ILbg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 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. [212.18.0.9]) by gmr-mx.google.com with ESMTPS id j81si1501943wmd.1.2018.01.03.02.05.45 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Jan 2018 02:05:45 -0800 (PST) Received-SPF: neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) client-ip=212.18.0.9; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3zBRQK4Jh1z1qsDJ; Wed, 3 Jan 2018 11:05:45 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 3zBRQK48Ymz1sFWv; Wed, 3 Jan 2018 11:05:45 +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 FnqRGmp-acoo; Wed, 3 Jan 2018 11:05:45 +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; Wed, 3 Jan 2018 11:05:45 +0100 (CET) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id 8A7714540613; Wed, 3 Jan 2018 11:05:44 +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 ezYl6xuuuBee; Wed, 3 Jan 2018 11:05:42 +0100 (CET) Received: from papero.fritz.box (papero.fritz.box [192.168.178.132]) by babic.homelinux.org (Postfix) with ESMTP id 4E24E4540100; Wed, 3 Jan 2018 11:05:42 +0100 (CET) From: Stefano Babic To: swupdate@googlegroups.com Cc: Stefano Babic Subject: [swupdate] [PATCH V2 1/2] Simply rename extract_script to extract_scripts Date: Wed, 3 Jan 2018 11:05:39 +0100 Message-Id: <1514973940-11131-1-git-send-email-sbabic@denx.de> X-Mailer: git-send-email 2.7.4 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 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: , The function extracts all scripts in the list. Signed-off-by: Stefano Babic --- corelib/installer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/corelib/installer.c b/corelib/installer.c index 4890e83..02461f7 100644 --- a/corelib/installer.c +++ b/corelib/installer.c @@ -145,7 +145,7 @@ int check_if_required(struct imglist *list, struct filehdr *pfdh, * Extract all scripts from a list from the image * and save them on the filesystem to be executed later */ -static int extract_script(int fd, struct imglist *head, const char *dest) +static int extract_scripts(int fd, struct imglist *head, const char *dest) { struct img_type *script; int fdout; @@ -166,7 +166,7 @@ static int extract_script(int fd, struct imglist *head, const char *dest) return fdout; ret = extract_next_file(fd, fdout, script->offset, 0, - script->is_encrypted, script->sha256); + script->is_encrypted, script->sha256); close(fdout); if (ret < 0) @@ -260,7 +260,7 @@ int install_images(struct swupdate_cfg *sw, int fdsw, int fromfile) /* Extract all scripts, preinstall scripts must be run now */ if (fromfile) { const char* tmpdir_scripts = get_tmpdirscripts(); - ret = extract_script(fdsw, &sw->scripts, tmpdir_scripts); + ret = extract_scripts(fdsw, &sw->scripts, tmpdir_scripts); if (ret) { ERROR("extracting script to %s failed", tmpdir_scripts); return ret;