From patchwork Mon Jul 15 15:35:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe REYNES X-Patchwork-Id: 1132086 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::23a; helo=mail-lj1-x23a.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="mDR5qxwk"; dkim-atps=neutral Received: from mail-lj1-x23a.google.com (mail-lj1-x23a.google.com [IPv6:2a00:1450:4864:20::23a]) (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 45nSKT060gz9sRm for ; Tue, 16 Jul 2019 01:35:39 +1000 (AEST) Received: by mail-lj1-x23a.google.com with SMTP id p3sf3931348ljp.8 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=ErjtpEMqKpr7uGIobR5A+jPbvEr5l11iTZSgfy1EuiqZPT/PKkZA7fBQBcn/HKoNZ5 +urlmih9Wc/i4Nf3K9O4joTJCpKxRE+L+e7ipEJdp38Gv//b84fgJ1UjyiX+XETG7DZU FUaotCr+nbUj6WrbIobu9jGIBBxGWRvjuuwyiYnr6+vZcN5VXTLi//geIfikWQHmKSpA XDun9fon7umMkKjZqxukEC2NEGetvYwPDLs03ZvevnOwKMJRq4X+YJtUeXGffXoWuM32 P/i5KtH9+JtMhkS9GAO/QrWbnkHGgSKh3lX3GoN7ZVx1k5arRMt/JqIvjjwZRW7L67IL 0KaA== 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=JJZ/xp2SDqhaVCbZT/Rie7BnubvRmrWg18HQ36sH3p0=; b=uCHj9iAMUHLfy6fJGO3Lq2BKuCtKi5G7fq8y+CbxE8MKT4t5/kLzpWKsKY79xfxQUI G22+9RrzMCBi0/bkhzG1Q5ypGdZZPoovm2Alw4LA8HPWEfH9K+feO2r0RAevwveMDpU5 OoT76VnE0p9foJ8EErT1/7onsm01CbDyEpAuprI4OYu5wyVYsQNM1d89ruR1YEZVfir6 gPFtg2T1b2nZNTYOQSBQRHH5c/4VDyQ3UCrG33HxtMr+yv2CjtGNZP+28GoL3vjE/Z82 M9onAqswg2j775h0ZwUhlU2QvBy8HyyePNOjHOBT6z5/WxiLdjmvwnkE/bQ+itRR4jeJ 4/BA== 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=JJZ/xp2SDqhaVCbZT/Rie7BnubvRmrWg18HQ36sH3p0=; b=mDR5qxwkT+yD4FpbdHgK6rcXXkzghAc1vDzr6UkhRGtexejfpBcKbTIS7zdFpPy3g6 Yj0zLeyAekW8XkIJ3FSCiC0gbfwSgHbahdz1Yl4snK4OLwr2JQDoPq7+P4AvdXHw/jW8 xiVNYePOakKRNq0J7qAzXkcJwdn6YsmNf55Q+MSpFOzh4aga7EIYRAG/CeOHpmvbLd6U Xf+WA4eRLfWZh8WY/R+uEzrxrot5kFB0Eg4LUdYF2C5D5IkryW3vrRbF5H2s4u0fI1J+ zzQIqi407rv8dDOLebQPnkgFN4u8OianKaVib3RC/Zf73b3+Ojn+rwrLQcljVIo0QfIy LX9A== 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=JJZ/xp2SDqhaVCbZT/Rie7BnubvRmrWg18HQ36sH3p0=; b=CaGPaJo9V0d+64HqB29Dl26+j0euDZXciy93f/UompLPqlKUFZVRVw+JpgDIaKyh1C tYJa4DO58Bco8NMvgUu1hZw2CVtVu4TWA8fO54TQR2kurIDpA0ng17V+SwxHZRo2xT/g QIj6Y04AqjfAph+leJBmI521lGZAZpP6fBjD1bCcGN1Sjwcb5m8VNcmB7KSIRhs5bDTG 6b8PvhGo5IRH2TAkzg88fKASMY5AjmZLa9I+E8m2LBKhO/cjcnN3Du3kedHmrQSOUApO WYcWrvwtgP+bf+FW+yu7yBeVX9kqIyCFeTvhtAx7HppXYr/SZCSagRvpNgz7wGh2Dnhl 3Elg== Sender: swupdate@googlegroups.com X-Gm-Message-State: APjAAAV3oO2ktJqtnLFLIMH4k7yrP7UpZGeeno7aoaLIqAGZWGGwtXWB JPj1IIeeF1Pn67j/O16QXuE= X-Google-Smtp-Source: APXvYqyknaDyzKIIbiZHgVn5IR0hzTv/lId6HaSdJVPxBwsT3cKNsu9lc2SnPrWhKgkRIgA7lo7juA== X-Received: by 2002:a05:651c:c6:: with SMTP id 6mr14485500ljr.127.1563204936426; Mon, 15 Jul 2019 08:35:36 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: swupdate@googlegroups.com Received: by 2002:a2e:6556:: with SMTP id z83ls1993793ljb.11.gmail; Mon, 15 Jul 2019 08:35:36 -0700 (PDT) X-Received: by 2002:a2e:898b:: with SMTP id c11mr14943182lji.241.1563204935984; Mon, 15 Jul 2019 08:35:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563204935; cv=none; d=google.com; s=arc-20160816; b=zByf1NG7YABSshqMprxhbD5S6X6K6D1chwB0UaY1J41LzzcyidWAqVy0sev3kZJU1A P7fdl+RQCVNc+hoc5GhHnDHKspDRJimOhkZrTwX64sUqp3TiA/TvwZRmTwTsKpGK6u19 NGSrIusrE1r/w0DWALJYgwqNK0UBFuf3nNNdI7cgwxOy0bFf6A1cCUn+K27mptKXo45x KvsLxqGEQMDfRITi7VfN/tN/kEybk4JYuusCQrMdjcsN22vKV9Zc2rMG0bZD14Lez0+i IsXBj06Y0l/CYyxXIf7ryNbhjKgpmy3ajGPxaw/wp4YeFhH8YzDEV19mXF1p+emEnMw1 hqyQ== 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=zyhnV6JnNXnXNPbVBcV4dsZJ9edmf7X7uYag9LAY+WI=; b=CTjgoLM0WGN94xDXhj8iw5q+J8pMpl8iiPppCYIeSwkPeMpx95nNPFoMK4ovSVOtOX Vr0TP1rOxtbmkHTAOYTjazSZnEmiaTlGojcMQFlq/zYQs/vtOmGSjm3H3iWpdEFY09Qz 1Ys2YkI53pZegj7s9CliuzBDfw0cqHKghNgIEKYAMyG5CG5TvBTn+rn/AddUAp7H17UK uP0AAezIpQ6FPQWWaHRmsgqo/J9G5tVhsEOJQq3982WtW3Rf8002i5QLvPyi19Qjhmn5 XbyTeEDKevonzlyS2qEOQUXhaxRyfdbGppHjrpaZQ47fmXK70zCLBKzio/XkOfGdHWH/ lhTw== 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 s14si1132493ljg.4.2019.07.15.08.35.35 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Jul 2019 08:35:35 -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 0400651FE6 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 026EF1600C2; 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 08eKlC0tLQ1U; Mon, 15 Jul 2019 17:35:34 +0200 (CEST) Received: from sahnlpt0333.softathome.com (unknown [149.6.166.170]) by mtaout20.int.yaziba.net (Postfix) with ESMTPSA id DAAE11600B9; Mon, 15 Jul 2019 17:35:34 +0200 (CEST) From: Philippe Reynes To: swupdate@googlegroups.com Cc: Philippe Reynes Subject: [swupdate] [PATCH 1/4] handlers: add a special handler flag NO_DATA_HANDLER Date: Mon, 15 Jul 2019 17:35:26 +0200 Message-Id: <1563204929-2762-2-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 add a special handler flag NO_DATA_HANDLER to define a handler that don't use a file from the swupdate image. Signed-off-by: Philippe Reynes Acked-by: Stefano Babic --- core/handler.c | 12 ++++++++++++ include/handler.h | 8 ++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/core/handler.c b/core/handler.c index 5716be9..d8f879e 100644 --- a/core/handler.c +++ b/core/handler.c @@ -78,3 +78,15 @@ struct installer_handler *get_next_handler(void) return &supported_types[handler_index++]; } +unsigned int get_handler_mask(struct img_type *img) +{ + struct installer_handler *hnd; + unsigned int mask = 0; + + hnd = find_handler(img); + + if (hnd) + mask = hnd->mask; + + return mask; +} diff --git a/include/handler.h b/include/handler.h index 73e855a..74c94dc 100644 --- a/include/handler.h +++ b/include/handler.h @@ -25,11 +25,13 @@ typedef enum { FILE_HANDLER = 2, SCRIPT_HANDLER = 4, BOOTLOADER_HANDLER = 8, - PARTITION_HANDLER = 16 + PARTITION_HANDLER = 16, + NO_DATA_HANDLER = 32 } HANDLER_MASK; #define ANY_HANDLER (IMAGE_HANDLER | FILE_HANDLER | SCRIPT_HANDLER | \ - BOOTLOADER_HANDLER | PARTITION_HANDLER) + BOOTLOADER_HANDLER | PARTITION_HANDLER | \ + NO_DATA_HANDLER) typedef int (*handler)(struct img_type *img, void *data); struct installer_handler{ @@ -45,4 +47,6 @@ int register_handler(const char *desc, struct installer_handler *find_handler(struct img_type *img); void print_registered_handlers(void); struct installer_handler *get_next_handler(void); +unsigned int get_handler_mask(struct img_type *img); + #endif From patchwork Mon Jul 15 15:35:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe REYNES X-Patchwork-Id: 1132084 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::438; helo=mail-wr1-x438.google.com; envelope-from=swupdate+bncbaabbr52wluqkgqe55kptui@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="UjH2R+T3"; dkim-atps=neutral Received: from mail-wr1-x438.google.com (mail-wr1-x438.google.com [IPv6:2a00:1450:4864:20::438]) (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 45nSKS5dnnz9sRd for ; Tue, 16 Jul 2019 01:35:39 +1000 (AEST) Received: by mail-wr1-x438.google.com with SMTP id i6sf9027975wre.1 for ; Mon, 15 Jul 2019 08:35:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563204935; cv=pass; d=google.com; s=arc-20160816; b=VDQvjsbnDvF4EuN0xu4puSWCHw8Hr101hEqDYs6SnTVkBvY29UuWe0POFHcrxi5oL9 8ESX9HHn5SNAqdvc5DrgsS6eHKhxR7V1j/HPrldTDW7to7WX+2wqayQ5GcAR6ZjUrrcn bfJW92U/6QMhW0rhIqK4kFvmeTxGLKPfxNgkSisEoX1bHe/1ANROTQX5/UwYl+0Mnv8h OciyVr45IJE8mIW99BJNJ+BAuAFPO5IbMjZxxTvULK4IPst/F9+BKIiYniKEHvLM43qz iZE9p9pFxXUTmNoLmph7LZ7IuqXrL6kp8szcVpGY5WmRCY/oTfz9XtTfkyIs0EUWp9dg XmWQ== 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=btS9QOiQjl5b1xHHB0QXyIB6AhiUyVLM6ZD4UNcz4m0=; b=mpJ6xIxOvbfxawL8jpAGi+1KVsFYL42Zi5eQhWzai+NqoiqK5QsjKgBtfLoYFEqgvy QxZZ3LbLfEk+gyII1gJXHK2Skn8lYmy6+aWqai2GTBo2iLNP3zwMLTYELNl3gRHXnF5A vz2WdOr5BakjighcF/jDsxuj0GzKYb/uoFp7SSGl6s5ZB80AA+GQkgGVs7P676HqyRH+ ZpaTpzCMmDMC2uvDfNm8yQCYjsFclIYizTHcrXeu0N1D2Rv3lw0xlYQ+XIntfOyX7lNf qkLNmlRNRDyu4PZc0VFFN5dnDzUfMB7tsa4n84c2tByKRuiGriFaEMJmrwiVD3ipozqA macA== 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=btS9QOiQjl5b1xHHB0QXyIB6AhiUyVLM6ZD4UNcz4m0=; b=UjH2R+T35OQHFTIrzbSjH2gVj5vO7Ge/n4DoSCZznp8pFVc0JgHHZE5nem96RIozXN bUSj3vgiXr6zs72pY9v/R+LN3tt+Hl1fXIQjfCXvBIH4T22+EDr9+q/NOaGJ8oJkiM6k d/3U/Wq8Gf6ulV+4h9y4QcB6fK9Xp1+/LAMi+qgOuh6WcaNg3YM6ah0ucAZ744yjFZJk 6zC8DmSCJfS54KFXcacVjbwFmvgmf956BkuxoIjyuoVfRpXkOFMkOYwOPVxfEPvXN/sM Jd7QEfHBfLycn6x18tmNWiGsG9l0i9kS5c6zMn5/6y1TVSWXifgJ4hWdq52l3fEdw2ju pCVg== 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=btS9QOiQjl5b1xHHB0QXyIB6AhiUyVLM6ZD4UNcz4m0=; b=C7+CVrARESHVA2uD65IBXf573uD1YqdIff+QbOVGSx/gqx3yIltlq2Kb60Hb4ZDgIE NJGvsFcrOigEFyK99Tz+XukexifsExGYw9YDfjBfiROhb9FVrBxqTVD5qotOHJ9BRfuz RKyTRbxOPnnnw0kBhlUasC/MIX81IQkAVAfaxAAmpbkjBj+XzlBNf1qWLZ3f6xmAH0Vk o5k7WSlRs3jDfteKsCXJwNS3CfeS5TbRqMOb2qfIRjg5J30Rrh4waYBOQi+xR5137RJA VsLiAbfKULh2DqmjLvyeihVPqu2PisOjxoeHosXRaaDKeh4UHevb5RJ10jarjERkHgdn xUwQ== Sender: swupdate@googlegroups.com X-Gm-Message-State: APjAAAV02jWx/r/L4jvilTlbnN3eP9inZhERKndP//P27ztSQeZmbqDy jgk7yL5ur94E6sJ8YOGmTMw= X-Google-Smtp-Source: APXvYqz7132TWQlO05PZo9BJ2Scu2T5xbug8lzZUTvDWInk9vLvqgJiFC1QIAJCqgMYw1kZFv8iiHA== X-Received: by 2002:a5d:4e4d:: with SMTP id r13mr31141950wrt.295.1563204935718; Mon, 15 Jul 2019 08:35:35 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: swupdate@googlegroups.com Received: by 2002:a7b:cc10:: with SMTP id f16ls6932235wmh.2.gmail; Mon, 15 Jul 2019 08:35:35 -0700 (PDT) X-Received: by 2002:a1c:f415:: with SMTP id z21mr26110864wma.34.1563204935284; Mon, 15 Jul 2019 08:35:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563204935; cv=none; d=google.com; s=arc-20160816; b=mAr52/+mRCC10fr1XonbIVarPLS0v+76vwuzI+nuqHORTOSCYs5rWkKOEHp79rVvNy H/CcQcS3+GpMxznk1lY/gruNjjhZKfXyHYoJmHob/VE0r6Uo3birrWo55kkdIvmIGZEY BvBb9TMW1fuvzaTMeRPGH4Smhltpyz8o1dn4kdeyQdYb6SwCMbmLR0ThMrBMwokt26v5 xcVsBwUC7OhrZ7FwNpnXuzk6D0rOxo22fS+uRW1AW4QftBcBQF88JAY4BwN5t65TGUOp BfwYkCvKh6rsGWsnKFf3XVuT4VF7Otn05ePSYBQZI4dBe6ZwjG9BnC/WPwvVRqSDvhE2 NcSw== 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=0f5iVjc9rNlRqn6IVKYd6SG85eyPP/6C4eumC2Dcu/c=; b=zC1RUzhbe+Dg1ABBbZfOLCr8NYfXVj78X9C75UlRM4kysof9ATUSdm+0Uu5lTrUtbq eFNL7vNqC5KPN/f+HpQqmKRaX5wQXCXKQjj5iWjPNEy0yWiBOAdNDvCwcsfms+c78YPC sUz/XPL1xxwIIKa5Cc5Gmck64TUC2hKuwA1Lko8zVo3sl8MiGRUQJrv2futV6Cidi5AI zwkaZ3gSzEWIEQHc65hbBCngh6CLjIWMuxzJBeHOPCTW/XNvuWdHkg4TkD4PpoC/ne2/ roLwrbNFXn3THkUuc6HTndiF/sQdQTdYKhebcCKkwLS12aU/ZOuXD9BBCYSk6BZM4HZe f0vA== 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 j18si718205wmk.0.2019.07.15.08.35.35 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Jul 2019 08:35:35 -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 0401A51FEF 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 06C8E1600C7; 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 Zv_NkuOSn5wC; Mon, 15 Jul 2019 17:35:34 +0200 (CEST) Received: from sahnlpt0333.softathome.com (unknown [149.6.166.170]) by mtaout20.int.yaziba.net (Postfix) with ESMTPSA id E44CF1600BC; Mon, 15 Jul 2019 17:35:34 +0200 (CEST) From: Philippe Reynes To: swupdate@googlegroups.com Cc: Philippe Reynes Subject: [swupdate] [PATCH 2/4] handler: ubivol: set flag NO_DATA_HANDLER Date: Mon, 15 Jul 2019 17:35:27 +0200 Message-Id: <1563204929-2762-3-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 add the flag NO_DATA_HANDLER for handlers ubiswap and ubipartition. Signed-off-by: Philippe Reynes Acked-by: Stefano Babic --- handlers/ubivol_handler.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handlers/ubivol_handler.c b/handlers/ubivol_handler.c index cffb997..0f53a0a 100644 --- a/handlers/ubivol_handler.c +++ b/handlers/ubivol_handler.c @@ -594,7 +594,7 @@ void ubi_handler(void) register_handler("ubivol", install_ubivol_image, IMAGE_HANDLER, NULL); register_handler("ubipartition", adjust_volume, - PARTITION_HANDLER, NULL); + PARTITION_HANDLER | NO_DATA_HANDLER, NULL); register_handler("ubiswap", swap_volume, - SCRIPT_HANDLER, NULL); + SCRIPT_HANDLER | NO_DATA_HANDLER, NULL); } 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; From patchwork Mon Jul 15 15:35:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe REYNES X-Patchwork-Id: 1132087 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::43b; helo=mail-wr1-x43b.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="bIgxV2ZK"; dkim-atps=neutral Received: from mail-wr1-x43b.google.com (mail-wr1-x43b.google.com [IPv6:2a00:1450:4864:20::43b]) (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 45nSKS5zNCz9sRf for ; Tue, 16 Jul 2019 01:35:38 +1000 (AEST) Received: by mail-wr1-x43b.google.com with SMTP id i2sf9039684wrp.12 for ; Mon, 15 Jul 2019 08:35:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1563204936; cv=pass; d=google.com; s=arc-20160816; b=yiYQljGeQYZp6tsEmEFMY5TOkMpN0ceqBZkXoiOGPUxn+2V8sKkzOlBjrDWdGvFvTr wczTvdBBlgyjnM6sngU4nobV5NOxj3g5ZIAEgOHqhYY4n7d4hFHLpzSt9Zwoc7Auj6Ov 7PwFqKOmNDwWEXJ3MY9xcCEv+bYnjzr3Hv9Jsr/mT+VFpwTDhQfZjwovH+vmJtCYvTu8 obAaJEXzkBKXdQsbaKze58HnBEv5ZnMscsEp3m2Rk89IIS1jbgtbgBiVVBWwagBGQArq XKFtAbkLoFJTg/mGF1gL+DK+W6LXFFZCSM9wi+Km2nIqKE8qUXM/MW9qUIDEg6qLxLG0 YLbw== 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=hk8/M96VDMPfLmhuBI9ufa9kEMAUj/0B+s0vdMVVITE=; b=f7j0Q/oyf0H01cw9hCdDBkrO3k1XjqPeM77GitgrXKpS8zlbFwD3QVLrklh2X8yyJP qAVcIYYrYxfcOGvQfEwA9KBLRf+e2URFUxHEbUzvdV+MXwlohgPQ3rNiWO2XojbbFUbE EkkO9gE/+f85+A3xgoAnictqBu6akKMQmRN4ekQvAIywzWEEj/CoCOm3yLYBZK/VxA2s rWC6rqtU9lTYnGK2g5fU5R+zaJ6mDfoPZhADUN403rFHLo7J+mYX+hvQCM1/L2U+dgcu vmdq6Ni5br7T7kt3QkjunKUa+eyPp1RgRmxLPoi8mWqWwRSTiRus9FIV2FTpgAmR9Kul V0rg== 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=hk8/M96VDMPfLmhuBI9ufa9kEMAUj/0B+s0vdMVVITE=; b=bIgxV2ZKhODLKOtncdUYH+YObSLjFivwKWFPMTxd0TbgxkdpwAngGK2a5DBYj3KAzE Nd0tpKIrJKSvJ72XoXuM0ApUUdqxSzplbL1wxDfXb2ZJOLbtt1YHDY63yYgDCXvxFfDP ssNap8Fa4vXArBXhcLKqP4AgtYVMaknhlg/IEC7xIYw8MQ1IWhLr0kDIxY8r2eSGNZoy N5LzFKA8G8G63OdTRtDTbtmdqI/Oo61W3OQkQ/XvKipjrIeBWSc+BcBVhi+gBqLwViYE YXng8inz/m87T4dC50qkl7iPemJBY7XzTCJWT3A4sBhMWso72OSBt20VUk5zE/gPfyX3 WXBw== 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=hk8/M96VDMPfLmhuBI9ufa9kEMAUj/0B+s0vdMVVITE=; b=spaSp8bWDMvrB0sLLlgIjQgAkFLksLfShU5lojJWYxe6JMyuHLQObgJoT3xT4S5JqF jx9MdQfs0+hm4XwGHlKGuQHLDxJ/VxeqoDSvj1jpwiyZ7tcE2YChHn+78AJhg1eOA0S9 0/PgqGy6HOVLCpI1FSPppukBnrK869wPJEdwGNVvD+cTbvwPVQF0Tsi0JdT4vHdLRMJ+ p2ldRKf/yjdpIdTMqK2sso247Ft+fTro5TbLCnCpIGUE3n+nGmD/Hqjy/zoj0SIXA1SB OGp30I3vcGWseK/G6NozD+feR0Dog+0+hPw0HN4h69tvNT4l8ixT5aS2BtQx7yDtVcQ9 GNuQ== Sender: swupdate@googlegroups.com X-Gm-Message-State: APjAAAXmFXB5KBZeY2VRNeGi8Q+mw1dEJTZOX+HBlRaHMgEAnW0DCvCh Q8TMqKnzqjdCO0deo3xbWM4= X-Google-Smtp-Source: APXvYqx3zhJaOlDJKTxA/zNmIbF1BCtdA8wO/F5Mu+UL0VhNdysblrcH7BcSu/DnDxw/GpjtYrAYjw== X-Received: by 2002:adf:f204:: with SMTP id p4mr30883921wro.317.1563204936474; Mon, 15 Jul 2019 08:35:36 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: swupdate@googlegroups.com Received: by 2002:a5d:4907:: with SMTP id x7ls4659535wrq.0.gmail; Mon, 15 Jul 2019 08:35:36 -0700 (PDT) X-Received: by 2002:a5d:65c5:: with SMTP id e5mr25597432wrw.266.1563204936112; 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=VudrHmkPvuhzMLUrvLJ8k5oHJY5zHivoGzAwpM1gRBdj5oVG1z7UncbF2RVgx7a+/j MIzOs0RSsGDdLAb2xijKolzuEtekrDVRO+nOBqXv/GpjLwjYITISWov+iJ5THihwsHIQ 9hI5zxTmpLLTDG+r/as+a2RKwqP5mHzXeimPPjpeBJry7sdVxW5z10j2GD/BwgE404sr V5FAbXH/KALluC0eSS9Njpsoq5ZHr4q4gIPu+HEwPl8PLmnH/ZEFiM0+wG/HceZCMTcL mJo+++vcRZz/1ju3Uiq5olpTA6226LxwNuzPoDZWdVneLkgBqMlrv7lEatlOO06n2frf 6JtQ== 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=rCZjmCYH2naDHqRQWjDignKzN+zjPLn0esOI+i/HO98=; b=mmKhkafckcEqx1iZXHb2lnjkEaRm9hxCmIHmtE8aqHEwj//JyYzS8nwoBVwgYYPIAE JoDY1nlBvn9iN8MmjGyDZzi3TwPGU9lge+OqKjRMtl458F2CGJ8ibFGzKi/9iYGG2u62 ImDS4TzFjS9s02N1xh8kCIYP87BvwQhDgeJ8Qwmq11HzGBDnN9rRT/UphWsWRzGVVnu1 SDYODsAaeJF9I6b3guwLN2WwMKz9tXGRBOuzxduNsecr7SQy5OF8SZVn12fDI7cMkxfh +YRTvS2TnDTDMXQF8oGW9SMod2nryuoR5iif+GEVycDUQJeow2+CQEfHNo+BkaD9cgXd ET3g== 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 q14si972812wmc.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 1A9E051FF3 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 1F6D5160019; 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 AWGyRwCCvMhP; 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 0557A1600C3; Mon, 15 Jul 2019 17:35:35 +0200 (CEST) From: Philippe Reynes To: swupdate@googlegroups.com Cc: Philippe Reynes Subject: [swupdate] [PATCH 4/4] parser: check_missing_hash: use flag NO_DATA_HANDLER Date: Mon, 15 Jul 2019 17:35:29 +0200 Message-Id: <1563204929-2762-5-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_missing_hash, 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/parser.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/parser.c b/core/parser.c index 62a1cfb..74b6a74 100644 --- a/core/parser.c +++ b/core/parser.c @@ -68,11 +68,10 @@ static int check_missing_hash(struct imglist *list) LIST_FOREACH(image, list, next) { /* - * Skip "ubipartition" and "ubiswap" because there is no image + * Skip handler with no data because there is no image * associated for this type */ - if ( (strcmp(image->type, "ubipartition")) && - (strcmp(image->type, "ubiswap")) && + if ( !(get_handler_mask(image) & NO_DATA_HANDLER) && (!IsValidHash(image->sha256))) { ERROR("Hash not set for %s Type %s", image->fname,