diff options
author | Prashant Bhole <bhole_prashant_q7@lab.ntt.co.jp> | 2018-05-14 10:29:15 +0200 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-05-14 23:41:59 +0200 |
commit | 53ea24c20cea32b1dc70673402b496c4a5291d2d (patch) | |
tree | 07298680244a2c50bf57d51f58bf3c303dc4276b /samples/bpf | |
parent | Merge branch 'bpf-stackmap-nmi' (diff) | |
download | linux-53ea24c20cea32b1dc70673402b496c4a5291d2d.tar.xz linux-53ea24c20cea32b1dc70673402b496c4a5291d2d.zip |
samples/bpf: xdp_monitor, accept short options
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>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'samples/bpf')
-rw-r--r-- | samples/bpf/xdp_monitor_user.c | 4 |
1 files 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': |