From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A146DA0524; Sun, 13 Dec 2020 00:35:38 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DC08DC97A; Sun, 13 Dec 2020 00:35:02 +0100 (CET) Received: from mail-lf1-f67.google.com (mail-lf1-f67.google.com [209.85.167.67]) by dpdk.org (Postfix) with ESMTP id 413A7C96E for ; Sun, 13 Dec 2020 00:35:00 +0100 (CET) Received: by mail-lf1-f67.google.com with SMTP id a8so20924974lfb.3 for ; Sat, 12 Dec 2020 15:35:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=05dzu64jxmDi4qQVNBDxcY0/CW18BQVlXg2FA763tMA=; b=Ae4Lcq6C65zrTYE2fSJGYe67jWSlx2O4WfugUPVxAtUX7OdbZd8fXovfN2yWd1LM9h ++UsCuYHqvwXIIcgbpD1uzp6pz+YbzKfmCYMTxGe1VI2aeWiOBUUCXroU8EMeFFNQnM4 3oePJDzlwXvv168vCM/ORju5wbo+GTreCr+cG907mtNL0SZYllp0uVITGELoF7hxanZ6 Cf6tG59f0c5K4fnqEcU5F1M8cSg89lYYlhMKLiF6r/dXPDIxyTE3vVTooSa5O3V8TD/Z hb3V2U5JPauGfFTvgJIVYGB9lS0vd71/+i56zYjNRUBx7Z7R+g+XTqmXgZVkoSeTjgZF 2PbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=05dzu64jxmDi4qQVNBDxcY0/CW18BQVlXg2FA763tMA=; b=Jnwor3F2nyZ0BJBc6IXtH2pE/AKxL7PkqlN1xGWZRjH2LyF3i1dU0aIvt63ramZ8Cg y3p/DoszCiNr49lQ5Cp8KSgI67TrPc4Apa5PPBiiaTkAzPfL75y4eTqetWaC8D5on9wv W91VCeNa2dn0+R7XxJrw3r1fcA+im9UObhogmjXKsCEwD6RWL0WRNI7EzL1tm9YP+cNF dlLscU18F+bGdnEIZle6lGymf+ZQkGNOFbK77IjzXFD2IRQw6Vy2gpS7PuzrLt4RneHZ EFQ7C2V8iytls/Qbq8Zdyk149OxfGbA4dPmRC6ADLWl44EFbgR2kA/5jS7mDsINFOni4 qERQ== X-Gm-Message-State: AOAM5333rZff/NUAjUQVPgMT8ECNT3VkBC1EtrpHXLxaunV/WuwWya4B 5q0URMghyrWlIZo0hK7k8DOe4ZMFg6NlQcnV X-Google-Smtp-Source: ABdhPJxVg0i8tDDaDe4MccsMQPfZ6Oufdd5T4VGqTXZXk5XLGML+9+/1IUAUX0bOOtep8YlctNTN9Q== X-Received: by 2002:a2e:8910:: with SMTP id d16mr7700889lji.357.1607816098569; Sat, 12 Dec 2020 15:34:58 -0800 (PST) Received: from localhost.localdomain (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id b22sm1517930lfp.233.2020.12.12.15.34.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Dec 2020 15:34:58 -0800 (PST) From: Dmitry Kozlyuk To: dev@dpdk.org Cc: Narcisa Ana Maria Vasile , Pallavi Kadam , Dmitry Malloy , Dmitry Kozlyuk , Neil Horman Date: Sun, 13 Dec 2020 02:34:45 +0300 Message-Id: <20201212233447.23154-3-dmitry.kozliuk@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201212233447.23154-1-dmitry.kozliuk@gmail.com> References: <20201212233447.23154-1-dmitry.kozliuk@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 2/4] pmdinfogen: allow multiple input files X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Process any number of input object files and write a unified output. Signed-off-by: Dmitry Kozlyuk --- Used in the next patch, separated for clarity. buildtools/pmdinfogen.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/buildtools/pmdinfogen.py b/buildtools/pmdinfogen.py index 65d78b872..3209510eb 100755 --- a/buildtools/pmdinfogen.py +++ b/buildtools/pmdinfogen.py @@ -194,7 +194,9 @@ def dump_drivers(drivers, file): def parse_args(): parser = argparse.ArgumentParser() parser.add_argument("format", help="object file format, 'elf' or 'coff'") - parser.add_argument("input", help="input object file path or '-' for stdin") + parser.add_argument( + "input", nargs='+', help="input object file path or '-' for stdin" + ) parser.add_argument("output", help="output C file path or '-' for stdout") return parser.parse_args() @@ -230,10 +232,14 @@ def open_output(path): def main(): args = parse_args() - image = load_image(args.format, args.input) - drivers = load_drivers(image) + if args.input.count('-') > 1: + raise Exception("'-' input cannot be used multiple times") + output = open_output(args.output) - dump_drivers(drivers, output) + for path in args.input: + image = load_image(args.format, path) + drivers = load_drivers(image) + dump_drivers(drivers, output) if __name__ == "__main__": -- 2.29.2