All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next v2] samples/bpf: xdp_monitor, accept short options
@ 2018-05-14  8:29 Prashant Bhole
  2018-05-14 10:20 ` Jesper Dangaard Brouer
  0 siblings, 1 reply; 3+ messages in thread
From: Prashant Bhole @ 2018-05-14  8:29 UTC (permalink / raw)
  To: Daniel Borkmann, Alexei Starovoitov
  Cc: Prashant Bhole, Jesper Dangaard Brouer, David S . Miller, netdev

Updated optstring parameter for getopt_long() to accept short options.
Also updated usage() function.

Signed-off-by: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
---
 samples/bpf/xdp_monitor_user.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/samples/bpf/xdp_monitor_user.c b/samples/bpf/xdp_monitor_user.c
index 894bc64c2cac..05ad3f590c91 100644
--- a/samples/bpf/xdp_monitor_user.c
+++ b/samples/bpf/xdp_monitor_user.c
@@ -58,7 +58,7 @@ static void usage(char *argv[])
 			printf(" flag (internal value:%d)",
 			       *long_options[i].flag);
 		else
-			printf("(internal short-option: -%c)",
+			printf("short-option: -%c",
 			       long_options[i].val);
 		printf("\n");
 	}
@@ -594,7 +594,7 @@ int main(int argc, char **argv)
 	snprintf(bpf_obj_file, sizeof(bpf_obj_file), "%s_kern.o", argv[0]);
 
 	/* Parse commands line args */
-	while ((opt = getopt_long(argc, argv, "h",
+	while ((opt = getopt_long(argc, argv, "hDSs:",
 				  long_options, &longindex)) != -1) {
 		switch (opt) {
 		case 'D':
-- 
2.13.6

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH bpf-next v2] samples/bpf: xdp_monitor, accept short options
  2018-05-14  8:29 [PATCH bpf-next v2] samples/bpf: xdp_monitor, accept short options Prashant Bhole
@ 2018-05-14 10:20 ` Jesper Dangaard Brouer
  2018-05-14 23:07   ` Daniel Borkmann
  0 siblings, 1 reply; 3+ messages in thread
From: Jesper Dangaard Brouer @ 2018-05-14 10:20 UTC (permalink / raw)
  To: Prashant Bhole
  Cc: Daniel Borkmann, Alexei Starovoitov, David S . Miller, netdev, brouer


On Mon, 14 May 2018 17:29:15 +0900 Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp> wrote:

> Updated optstring parameter for getopt_long() to accept short options.
> Also updated usage() function.
> 
> Signed-off-by: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
> ---

Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH bpf-next v2] samples/bpf: xdp_monitor, accept short options
  2018-05-14 10:20 ` Jesper Dangaard Brouer
@ 2018-05-14 23:07   ` Daniel Borkmann
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Borkmann @ 2018-05-14 23:07 UTC (permalink / raw)
  To: Jesper Dangaard Brouer, Prashant Bhole
  Cc: Alexei Starovoitov, David S . Miller, netdev

On 05/14/2018 12:20 PM, Jesper Dangaard Brouer wrote:
> 
> On Mon, 14 May 2018 17:29:15 +0900 Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp> wrote:
> 
>> Updated optstring parameter for getopt_long() to accept short options.
>> Also updated usage() function.
>>
>> Signed-off-by: Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp>
> 
> Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>

Applied to bpf-next, thanks everyone!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-05-14 23:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-14  8:29 [PATCH bpf-next v2] samples/bpf: xdp_monitor, accept short options Prashant Bhole
2018-05-14 10:20 ` Jesper Dangaard Brouer
2018-05-14 23:07   ` Daniel Borkmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.