diff mbox

[rdma-core] rc_pingpong: Fix getopt processing of -t

Message ID 20180131000415.GA29879@ziepe.ca (mailing list archive)
State Accepted
Headers show

Commit Message

Jason Gunthorpe Jan. 31, 2018, 12:04 a.m. UTC
The -t option never had an argument, a : was erroneously added when
the -c option was added

Fixes: 099c5aa50bc8 ("libibverb/examples: Add command line option to enable buffer validation")
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
---
 libibverbs/examples/rc_pingpong.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Leon Romanovsky Jan. 31, 2018, 5:58 a.m. UTC | #1
On Tue, Jan 30, 2018 at 05:04:15PM -0700, Jason Gunthorpe wrote:
> The -t option never had an argument, a : was erroneously added when
> the -c option was added
>
> Fixes: 099c5aa50bc8 ("libibverb/examples: Add command line option to enable buffer validation")
> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
> ---
>  libibverbs/examples/rc_pingpong.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

Thanks, applied.
Yuval Shaia Jan. 31, 2018, 7:17 a.m. UTC | #2
On Tue, Jan 30, 2018 at 05:04:15PM -0700, Jason Gunthorpe wrote:
> The -t option never had an argument, a : was erroneously added when
> the -c option was added

Thanks,
Now i've learned how to add arguments so can implement Ram's idea :)

Sorry for that.

Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>

> 
> Fixes: 099c5aa50bc8 ("libibverb/examples: Add command line option to enable buffer validation")
> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
> ---
>  libibverbs/examples/rc_pingpong.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libibverbs/examples/rc_pingpong.c b/libibverbs/examples/rc_pingpong.c
> index b5153bceb8254b..cf5c045741b7be 100644
> --- a/libibverbs/examples/rc_pingpong.c
> +++ b/libibverbs/examples/rc_pingpong.c
> @@ -730,7 +730,7 @@ int main(int argc, char *argv[])
>  			{}
>  		};
>  
> -		c = getopt_long(argc, argv, "p:d:i:s:m:r:n:l:eg:ot:c",
> +		c = getopt_long(argc, argv, "p:d:i:s:m:r:n:l:eg:otc",
>  				long_options, NULL);
>  
>  		if (c == -1)
> -- 
> 2.15.1
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/libibverbs/examples/rc_pingpong.c b/libibverbs/examples/rc_pingpong.c
index b5153bceb8254b..cf5c045741b7be 100644
--- a/libibverbs/examples/rc_pingpong.c
+++ b/libibverbs/examples/rc_pingpong.c
@@ -730,7 +730,7 @@  int main(int argc, char *argv[])
 			{}
 		};
 
-		c = getopt_long(argc, argv, "p:d:i:s:m:r:n:l:eg:ot:c",
+		c = getopt_long(argc, argv, "p:d:i:s:m:r:n:l:eg:otc",
 				long_options, NULL);
 
 		if (c == -1)