Add SKB command line option.

This commit is contained in:
gamemann
2021-11-12 16:39:36 +00:00
parent ad48c3c7f7
commit 04ba803b11
2 changed files with 8 additions and 1 deletions

View File

@@ -7,6 +7,7 @@ const struct option opts[] =
{ {
{"config", required_argument, NULL, 'c'}, {"config", required_argument, NULL, 'c'},
{"offload", no_argument, NULL, 'o'}, {"offload", no_argument, NULL, 'o'},
{"skb", no_argument, NULL, 's'},
{"list", no_argument, NULL, 'l'}, {"list", no_argument, NULL, 'l'},
{"help", no_argument, NULL, 'h'}, {"help", no_argument, NULL, 'h'},
{NULL, 0, NULL, 0} {NULL, 0, NULL, 0}
@@ -16,7 +17,7 @@ void parsecommandline(struct cmdline *cmd, int argc, char *argv[])
{ {
int c; int c;
while ((c = getopt_long(argc, argv, "c:lho", opts, NULL)) != -1) while ((c = getopt_long(argc, argv, "c:oslh", opts, NULL)) != -1)
{ {
switch (c) switch (c)
{ {
@@ -30,6 +31,11 @@ void parsecommandline(struct cmdline *cmd, int argc, char *argv[])
break; break;
case 's':
cmd->skb = 1;
break;
case 'l': case 'l':
cmd->list = 1; cmd->list = 1;

View File

@@ -6,6 +6,7 @@ struct cmdline
unsigned int help : 1; unsigned int help : 1;
unsigned int list : 1; unsigned int list : 1;
unsigned int offload : 1; unsigned int offload : 1;
unsigned int skb : 1;
}; };
void parsecommandline(struct cmdline *cmd, int argc, char *argv[]); void parsecommandline(struct cmdline *cmd, int argc, char *argv[]);