mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 04:31:50 +00:00
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>
This commit is contained in:
parent
1772be37fc
commit
53ea24c20c
@ -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':
|
||||
|
Loading…
Reference in New Issue
Block a user