Commit fbca0b28 authored by Kishon Vijay Abraham I's avatar Kishon Vijay Abraham I Committed by Lorenzo Pieralisi

tools: PCI: Add 'h' in optstring of getopt()

'h' is a valid option character for the pcitest tool 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: default avatarKishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: default avatarSekhar Nori <nsekhar@ti.com>
Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
parent ff7a5a0a
...@@ -163,7 +163,7 @@ int main(int argc, char **argv) ...@@ -163,7 +163,7 @@ int main(int argc, char **argv)
/* set default endpoint device */ /* set default endpoint device */
test->device = "/dev/pci-endpoint-test.0"; 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) { switch (c) {
case 'D': case 'D':
test->device = optarg; test->device = optarg;
...@@ -207,7 +207,6 @@ int main(int argc, char **argv) ...@@ -207,7 +207,6 @@ int main(int argc, char **argv)
case 's': case 's':
test->size = strtoul(optarg, NULL, 0); test->size = strtoul(optarg, NULL, 0);
continue; continue;
case '?':
case 'h': case 'h':
default: default:
usage: usage:
...@@ -225,6 +224,7 @@ int main(int argc, char **argv) ...@@ -225,6 +224,7 @@ int main(int argc, char **argv)
"\t-w Write buffer test\n" "\t-w Write buffer test\n"
"\t-c Copy buffer test\n" "\t-c Copy buffer test\n"
"\t-s <size> Size of buffer {default: 100KB}\n", "\t-s <size> Size of buffer {default: 100KB}\n",
"\t-h Print this help message\n",
argv[0]); argv[0]);
return -EINVAL; return -EINVAL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment