From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 689AAA0540; Fri, 4 Nov 2022 12:30:53 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5374C42D17; Fri, 4 Nov 2022 12:30:53 +0100 (CET) Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by mails.dpdk.org (Postfix) with ESMTP id 5609D42D10 for ; Fri, 4 Nov 2022 12:30:52 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id CF0923200916; Fri, 4 Nov 2022 07:30:50 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Fri, 04 Nov 2022 07:30:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm3; t=1667561450; x=1667647850; bh=Qv77HDmuVY9vgLdsKiO7gzd5b mPDpIIMOtx1r2OW8h0=; b=HHH58LWbTAIcCCI0X27IKPD4Ziqw3xtmIfeU4pp7L 33UHGab/rMNzGiPA4jhJLk45HtA3JZroxnVvrIXtIUOt59zKIQrqPUlds7+xinV1 A6jTiergN1L6qYDZUeuC+a7L3zSMybBfC+ziF0qrQfxjWon671/exY1N3TBmSkbk Vdtl1QFcN9WBFuxa5TqK1LL04VlpGwiHcMzGv4bLxfBtnMLpFlXkTJVGCJ9RjYTv 8hPSsZjepj/intBVr4q7UM5v901QRApXQMAsAEQIdq77aMJa9nOnYlKlpTNBGpLd uFk8DBSWKgJwvS4PMrWhDqv35P6srm2iFc9RN5PLlJJLQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1667561450; x=1667647850; bh=Qv77HDmuVY9vgLdsKiO7gzd5bmPDpIIMOtx 1r2OW8h0=; b=htToUruuawv3lcH3PR7wOzHOJ86lktQjJcjelKWVg52pbL0jqd4 T3HGXFtE24ctjggcDRkq8foM+DExi1S4KoejUzYTwjd8a6hYszoyepO0En4/uM/W RhpUm9g9DERdy1PlBTyu4SGWCsoTINdJa3dII6boYQR1Uh5sULf/1kTdthYu4hoJ uIT6jwEQusLH7yFlz/cpL+MV8HV1aToG+iDbun3TfWxWp7MeRRQGxDhO7EqKB9mz 1mUxMy+ZlCy6uex7o05TTZU7r2XdvD0pyOIWquN/xJF/to7HYxF2FGPWJcVYl05F 7RlZvrpmlTHcWuITJtILP/owzYbv/IN6xNw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrvddugddvjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvvefufffkofgggfestdekredtre dttdenucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhho nhhjrghlohhnrdhnvghtqeenucggtffrrghtthgvrhhnpeevveefveeiiefhtedukeegke elieegffeukeevudetueffieduveetiedukeefleenucevlhhushhtvghrufhiiigvpedt necurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvg ht X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 4 Nov 2022 07:30:49 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: rjarry@redhat.com, bruce.richardson@intel.com, stephen@networkplumber.org, dmitry.kozliuk@gmail.com Subject: [PATCH] usertools/hugepages: show usage if no action specified Date: Fri, 4 Nov 2022 12:30:18 +0100 Message-Id: <20221104113018.4069058-1-thomas@monjalon.net> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Previously, the script was doing nothing if no argument was provided. If neither show, mount/unmount, clear/reserve are specified, it is assumed that the user does not know how to use the script. So the usage is printed and an error code is used in exit. The user will understand something is wrong, and can recall the script with the option -h to get more information. Signed-off-by: Thomas Monjalon --- usertools/dpdk-hugepages.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usertools/dpdk-hugepages.py b/usertools/dpdk-hugepages.py index a22d504d3a..823cfcf185 100755 --- a/usertools/dpdk-hugepages.py +++ b/usertools/dpdk-hugepages.py @@ -272,6 +272,10 @@ def main(): args.reserve = args.setup args.mount = True + if not (args.show or args.mount or args.unmount or args.clear or args.reserve): + parser.print_usage() + sys.exit(1) + if args.pagesize: pagesize_kb = get_memsize(args.pagesize) else: -- 2.36.1