From: Kishon Vijay Abraham I <kishon@ti.com>
To: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: <linux-pci@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Kishon Vijay Abraham I <kishon@ti.com>,
Sekhar Nori <nsekhar@ti.com>
Subject: [PATCH 1/2] tools: PCI: Add 'h' in optstring of getopt()
Date: Thu, 4 Apr 2019 16:36:08 +0530 [thread overview]
Message-ID: <20190404110609.26158-2-kishon@ti.com> (raw)
In-Reply-To: <20190404110609.26158-1-kishon@ti.com>
'h' is a valid option character for pcitest utility used to print
the pcitest usage. Add 'h' in optstring of getopt() in order to get
rid of "pcitest: invalid option -- 'h'" warning. While at that remove
unncessary case '?'.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
---
tools/pci/pcitest.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/pci/pcitest.c b/tools/pci/pcitest.c
index ec4d51f3308b..34d71f7d3b12 100644
--- a/tools/pci/pcitest.c
+++ b/tools/pci/pcitest.c
@@ -162,7 +162,7 @@ int main(int argc, char **argv)
/* set default endpoint device */
test->device = "/dev/pci-endpoint-test.0";
- while ((c = getopt(argc, argv, "D:b:m:x:i:Ilrwcs:")) != EOF)
+ while ((c = getopt(argc, argv, "D:b:m:x:i:Ilhrwcs:")) != EOF)
switch (c) {
case 'D':
test->device = optarg;
@@ -206,7 +206,6 @@ int main(int argc, char **argv)
case 's':
test->size = strtoul(optarg, NULL, 0);
continue;
- case '?':
case 'h':
default:
usage:
@@ -224,6 +223,7 @@ int main(int argc, char **argv)
"\t-w Write buffer test\n"
"\t-c Copy buffer test\n"
"\t-s <size> Size of buffer {default: 100KB}\n",
+ "\t-h Print this help message\n",
argv[0]);
return -EINVAL;
}
--
2.17.1
next prev parent reply other threads:[~2019-04-04 11:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-04 11:06 [PATCH 0/2] tools: Fixes for pcitest Kishon Vijay Abraham I
2019-04-04 11:06 ` Kishon Vijay Abraham I [this message]
2019-04-04 11:06 ` [PATCH 2/2] tools: PCI: Handle pcitest.sh independently from pcitest Kishon Vijay Abraham I
2019-04-11 9:28 ` [PATCH 0/2] tools: Fixes for pcitest Lorenzo Pieralisi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190404110609.26158-2-kishon@ti.com \
--to=kishon@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=nsekhar@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).