From patchwork Mon Jul 15 15:35:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe REYNES X-Patchwork-Id: 1132088 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:4864:20::538; helo=mail-ed1-x538.google.com; envelope-from=swupdate+bncbaabbsf2wluqkgqeocrln2y@googlegroups.com; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=softathome.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.b="NqHbzsmS"; dkim-atps=neutral Received: from mail-ed1-x538.google.com (mail-ed1-x538.google.com [IPv6:2a00:1450:4864:20::538]) (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 45nSKS624Tz9sRk for ; Tue, 16 Jul 2019 01:35:39 +1000 (AEST) Received: by mail-ed1-x538.google.com with SMTP id z20sf13865072edr.15 for ; Mon, 15 Jul 2019 08:35:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563204936; cv=pass; d=google.com; s=arc-20160816; b=OvOXxKlxTTbIZx1owqDQQOdSga4YaZPhVwSbGuh3v10l0amaF0ZHSaMQuECVLySntD 4eSwJcHeUNbb/lIyKHEOOr+XUK+VZeOrczWBhyblCSnMOFv9J14QNbA4hyya4CGZQ3ei ZO0Y5UY0xIf87e5SIJNI0To32OaoPeIQHrAVUw3M4O3t7G1qxGj9A24tkhjez3ZZkJxx R0IObTf6jQk8OvgeIWTtXYeEEt9PeiEHeooWGmzzvsB7e/U24qk8yUph2QmcaQyOBNbW jdG+bmTCn3WdulMmZ/GgRSxs76UMVfV2y0oJYmoW3k6PTD6AciEHHGnETo992/wBBtCR TtEw== 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:references:in-reply-to:message-id :date:subject:cc:to:from:mime-version:sender:dkim-signature; bh=wiwhv+b6v37RBJBjZ+f7gUnanSx2T65ybJTDtcqM9/M=; b=kVvkKI7A+lfim9Kqe8Chmeh5wPy522A1wOnHeow6KvQjwC05bTD0fcl6oAbjczzCKy aA4Enxo8jpMKxPaxh7o1o6fK+zxusjytQ4YuZjA2O6FPpdk8DZbErqs+p5Hnc3TjelFf aEsX3jQ0qM0zGQAtC12IqwS5xunRVPujqTeDE7+whOiHcdWgIiD6Gi16c0UslnEUM1Aw YoRgoB2i2FN37I2d4QrymNT/zJDsZ3yTR2njdnGj+HrAZ2Y+nj9ELZmr9ouhqmEM/PzH lXgjemIy+BPhYKmT93ES6FeLQ2LRjm8xUh/iC2FrtZezo/1W+ZVo9ZWDf57zUj77g0i+ ozVQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=softfail (google.com: domain of transitioning philippe.reynes@softathome.com does not designate 185.56.204.33 as permitted sender) smtp.mailfrom=philippe.reynes@softathome.com 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:in-reply-to :references:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=wiwhv+b6v37RBJBjZ+f7gUnanSx2T65ybJTDtcqM9/M=; b=NqHbzsmSCO+abMRYDGaBThQ0v2Afp7wy0tW2QgA1BM9g5ycm9GKrhQYnXLiVZRNv7v QDsuOBSyxpspi8IudNDjYWGaPAQovE3uv57sCCh+0nxYA+FZLdeeg3mde6duRhUyW0fl GBQftBUCXIl4pz6wHtbvWHuGxesp++n6o+CasqwUMk1p0rC1fo4hLh8KKou0zAfNu0f0 bo6lMkr4Km8Oz/BtwSjSwIF3RA49QIdNt6kNBozLnFVJw33uZvAokggWgeprHpSoed7s xSSzIMkywi24VfzLMUZcv8tJ62udDUZaSABCsEhd9weV2t5EoIRtI7D5ST/bdEFHuh5G 3AKA== 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:in-reply-to:references: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=wiwhv+b6v37RBJBjZ+f7gUnanSx2T65ybJTDtcqM9/M=; b=jxEiOXBj0mtJ3lb584CDk9TgrKf2VTk8KLbC6yG+XXN7RG3BrcJ49BKRjHaOkGcyin WYsu0FPOpvKOABPXx8fqNLGpLvZMc8NrRUX0p0MalRpZL6sjPPxcRBUqX5GuUddMOdpv TyqMUDCbyffz5oqwKL7dMyVbPF4IPvzGkSJ9YQG47rkJspO9Dkp+8nNFXL5VAOZiJZ3g d13ot2uGx7I/h7Be7lpxwOxUff64QDf2G3I8wV+nPZlVd/8WIDJ89Aw+TJXMlA3FLM8B 93Pjz2TYzyH5b+P5d1nyM+KxXpj+i8fT2vacv9kbzbHRThohenb/pyCEA9U7nhY6h2HN RqcQ== Sender: swupdate@googlegroups.com X-Gm-Message-State: APjAAAXtL4hp3F4mhFwilGs9I6mct0MYYQAWcMbSWLMJ6t0JhvFKXSQp /vg92H+Lt8kdEZ8FkCvf5Mw= X-Google-Smtp-Source: APXvYqx+3+VM44cq/AQGqSfQKrxAosp36OEPRxHaXmnO/xVsBQ9vED7FW/IowmQ+SsjDOs4CCwkvwA== X-Received: by 2002:a50:ac07:: with SMTP id v7mr24045132edc.205.1563204936517; Mon, 15 Jul 2019 08:35:36 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: swupdate@googlegroups.com Received: by 2002:a50:aeee:: with SMTP id f43ls4166764edd.15.gmail; Mon, 15 Jul 2019 08:35:36 -0700 (PDT) X-Received: by 2002:a50:87d0:: with SMTP id 16mr23760751edz.133.1563204936200; Mon, 15 Jul 2019 08:35:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563204936; cv=none; d=google.com; s=arc-20160816; b=zYiFcej9ck2Ex882yelv5FAxTSBvXANKB5G4FPNpi/KZY6Fsc8PrL6Rrc4YjzLKh21 m7g1UxmPOLhWTBSfCRWfBg99r3HpFdvoNHzfdkN9553pf1t1PmKaifiFrrv3E3dsoa3Y Gx6P/G43uTbnSlx+8++ciF29hnWHdJ0tQSRqE1RTMyDTK6t7a0t36VGJZ1WYddpWbrDM WBcKRZfXDrj/E4puGobArSA/VPAMsIGlnn7qEWOFfvrben9A16QTN8XPbKlulOEcE1RQ wVmqs3kd6DVBq5TCHP8C0ERx6t7stl7lwucKKCrt7kBfhxrxDdF1cmmtg+kRoWAbylq9 UPWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from; bh=hM+JWPme71AMwFnyJf97HZlbyV1ZVTGJ3RBWFhB/P5s=; b=tFbmIwYgnSVFiWtrFrY5geE3Al5DJQNAEniMCHyF8sM502kOPIVTa0G3HIEzAh+IPu XPBYD//6DiMgycory06XR2BafSviyY/Z6H8I1XmqMBXr6ekFSeoLowuLqSSnlxQ5LP0J 59T7Q/H7B+E2iLoOI3vqNkWig8Mve3sKnxmvFThBfRyX1N9OsR4wJPIABYxaZfCgHlml i55pi2ord+OnaLyonGIy+93yUCXnvB/UyxGaQNTQMAnwK+bqmIfpb2iSwHjQlyFLrNjk y0ucQq8k3CcwOSdUAahXknwpAtRZrY0UxkxsQmANGRlPysK3oWFZef5N1yz3DjeOkSZZ hFCA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=softfail (google.com: domain of transitioning philippe.reynes@softathome.com does not designate 185.56.204.33 as permitted sender) smtp.mailfrom=philippe.reynes@softathome.com Received: from vrout30.yaziba.net (vrout30.yaziba.net. [185.56.204.33]) by gmr-mx.google.com with ESMTPS id t15si953855ejq.1.2019.07.15.08.35.36 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Jul 2019 08:35:36 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning philippe.reynes@softathome.com does not designate 185.56.204.33 as permitted sender) client-ip=185.56.204.33; Received: from mtaout20.int.yaziba.net (mtaout20.int.yaziba.net [10.4.20.37]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by vrout30.yaziba.net (mx10.yaziba.net) with ESMTPS id 1304051FF1 for ; Mon, 15 Jul 2019 17:35:35 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mtaout20.int.yaziba.net (Postfix) with ESMTP id 174E31600B9; Mon, 15 Jul 2019 17:35:35 +0200 (CEST) Received: from mtaout20.int.yaziba.net ([127.0.0.1]) by localhost (mtaout20.int.yaziba.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id CDFayQagZqsB; Mon, 15 Jul 2019 17:35:35 +0200 (CEST) Received: from sahnlpt0333.softathome.com (unknown [149.6.166.170]) by mtaout20.int.yaziba.net (Postfix) with ESMTPSA id EEA7E160019; Mon, 15 Jul 2019 17:35:34 +0200 (CEST) From: Philippe Reynes To: swupdate@googlegroups.com Cc: Philippe Reynes Subject: [swupdate] [PATCH 3/4] swupdate: check_provided: use flag NO_DATA_HANDLER Date: Mon, 15 Jul 2019 17:35:28 +0200 Message-Id: <1563204929-2762-4-git-send-email-philippe.reynes@softathome.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1563204929-2762-1-git-send-email-philippe.reynes@softathome.com> References: <1563204929-2762-1-git-send-email-philippe.reynes@softathome.com> X-CLAMAV-SCAN: ok X-VRSPAM-SCORE: 0 X-VRSPAM-STATE: legit X-VRSPAM-CAUSE: gggruggvucftvghtrhhoucdtuddrgeduvddrheekgdekhecutefuodetggdotefrucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhestddtredtredttdenucfhrhhomheprfhhihhlihhpphgvucftvgihnhgvshcuoehphhhilhhiphhpvgdrrhgvhihnvghssehsohhfthgrthhhohhmvgdrtghomheqnecukfhppedugeelrdeirdduieeirddujedtnecurfgrrhgrmhepmhhouggvpehsmhhtphhouhht X-VRSPAM-EXTCAUSE: mhhouggvpehsmhhtphhouhht X-Original-Sender: philippe.reynes@softathome.com X-Original-Authentication-Results: gmr-mx.google.com; spf=softfail (google.com: domain of transitioning philippe.reynes@softathome.com does not designate 185.56.204.33 as permitted sender) smtp.mailfrom=philippe.reynes@softathome.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: , This commit clean the code of function check_provided, instead of comparing the name with strcmp, we simply check the flag NO_DATA_HANDLER. Signed-off-by: Philippe Reynes Acked-by: Stefano Babic --- core/swupdate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/swupdate.c b/core/swupdate.c index b9f7676..58218d0 100644 --- a/core/swupdate.c +++ b/core/swupdate.c @@ -175,7 +175,7 @@ static int check_provided(struct imglist *list) for (p = list->lh_first; p != NULL; p = p->next.le_next) { - if (!p->provided && strcmp(p->type,"ubiswap")) { + if (!p->provided && !(get_handler_mask(p) & NO_DATA_HANDLER)) { ERROR("Requested file not found in image: %s", \ p->fname); ret = -1;