From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (xvm-189-124.dc0.ghst.net [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D9799A0524; Fri, 8 Jan 2021 03:47:50 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0F11F140DDB; Fri, 8 Jan 2021 03:47:38 +0100 (CET) Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) by mails.dpdk.org (Postfix) with ESMTP id 8ECB6140DCE for ; Fri, 8 Jan 2021 03:47:36 +0100 (CET) Received: by mail-lf1-f41.google.com with SMTP id a12so19557461lfl.6 for ; Thu, 07 Jan 2021 18:47:36 -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=XW19IglQaLhCMyVF34hwkQGQYKaq2Wb5TZQ6lyw3ttI=; b=LY6nlGrIqBlRSV4l/PnTzZsxDhE0Kmb9NpxbSxRX1awznNbzDAa+W/sXmJ9BsI4hAD m0Ay39Y/GR6nNPMW/h9emadktzw9XZu9+HFPSr+BsJkQsdE4Z+Y1mobSHV2b56fG649M 737Wvs/d3Wi83T0s10wDpQCoGZQ1qBqlK37cdjv6L7JkMKuS1s+Nep508iB39VOD3oRD MQ36EzYCHiJrHZpLDpHfOHsEL1iE3eavTZnCWGUSZDOmpv7h40duv6Uv+FcXXGb+TAXk We1suX0TUpLPN2M2hvhSoeqY9uLROYYDlVKZYerUvYJsHXxwYOG9b/ti22+N5IS5gtCV 0QUw== 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=XW19IglQaLhCMyVF34hwkQGQYKaq2Wb5TZQ6lyw3ttI=; b=muBRMPW4I5EGA2jZ9ZGTekzkuHhr6cS0BZNXZS/NuH8Tc6ao6r1vJz4XCU8mXCtqLV OnXRaZLMy+Cxqj3wMzD7QuLToB2s8viaWXgkWPpPsiCwkmTzyvAZVgEKuDxr3XAAkXib klLoSWgQ5oAIhaPjFtnWXJbevmKeNr6fEgyV/nIn7oQ6bo5EBFud5BA/EBUdNg4w27Ro m2arZE4pgU5pKQHcVAz4Y2hVehZRSH7CBT9i2WbgIo20d+9KplM5wT7B4L3i7i6FMHPV Gnsisp3PpL8yFqUXdNx6FDRFVvxx5uUpoL4VFC1u2LsqBepEIrnm6o5fAt2N+Un9KUWf puIQ== X-Gm-Message-State: AOAM531al4+ODKEYC0nKUXOWeYAdxIxargQpsVlm6+zMWeFMif2LMd0M tIGFlbHld7nDFePFrHn9a2+0I/HTWVZWxv8Q X-Google-Smtp-Source: ABdhPJyoCMvUbbuURZaguq6s5JzKzPQ4X3M+2mGB+hCLgUqriAE1Qu64qy27/8BkEM/w40+Xrt5WBA== X-Received: by 2002:a05:651c:1255:: with SMTP id h21mr633313ljh.8.1610074055993; Thu, 07 Jan 2021 18:47:35 -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 i19sm1733599ljj.26.2021.01.07.18.47.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 18:47:35 -0800 (PST) From: Dmitry Kozlyuk To: dev@dpdk.org Cc: Narcisa Ana Maria Vasile , Pallavi Kadam , Dmitry Malloy , Bruce Richardson , Neil Horman , Dmitry Kozlyuk Date: Fri, 8 Jan 2021 05:47:21 +0300 Message-Id: <20210108024723.26210-3-dmitry.kozliuk@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210108024723.26210-1-dmitry.kozliuk@gmail.com> References: <20201212233447.23154-1-dmitry.kozliuk@gmail.com> <20210108024723.26210-1-dmitry.kozliuk@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 2/4] pmdinfogen: allow multiple input files X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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 --- buildtools/pmdinfogen.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/buildtools/pmdinfogen.py b/buildtools/pmdinfogen.py index 474168f21..965c08945 100755 --- a/buildtools/pmdinfogen.py +++ b/buildtools/pmdinfogen.py @@ -197,7 +197,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() @@ -233,13 +235,16 @@ def open_output(path): def main(): args = parse_args() + if args.input.count('-') > 1: + raise Exception("'-' input cannot be used multiple times") if args.format == "elf" and "ELFFile" not in globals(): raise Exception("elftools module not found") - image = load_image(args.format, args.input) - drivers = load_drivers(image) 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