projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1772be3
)
samples/bpf: xdp_monitor, accept short options
author
Prashant Bhole
<
[email protected]
>
Mon, 14 May 2018 08:29:15 +0000
(17:29 +0900)
committer
Daniel Borkmann
<
[email protected]
>
Mon, 14 May 2018 21:41:59 +0000
(23:41 +0200)
Updated optstring parameter for getopt_long() to accept short options.
Also updated usage() function.
Signed-off-by: Prashant Bhole <
[email protected]
>
Acked-by: Jesper Dangaard Brouer <
[email protected]
>
Signed-off-by: Daniel Borkmann <
[email protected]
>
samples/bpf/xdp_monitor_user.c
patch
|
blob
|
history
diff --git
a/samples/bpf/xdp_monitor_user.c
b/samples/bpf/xdp_monitor_user.c
index 894bc64c2cac651851c0603e8f51af45a3692a45..05ad3f590c918647ace13c39f2d8a0ee0d2b7c0c 100644
(file)
--- 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, "h
DSs:
",
long_options, &longindex)) != -1) {
switch (opt) {
case 'D':